<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>襁褓的博客</title><description>记录生活&amp;技术&amp;日常&amp;动漫</description><link>https://note.xuqiangbao.xyz/</link><language>zh_CN</language><item><title>watermark 安装</title><link>https://note.xuqiangbao.xyz/posts/watermark/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/watermark/</guid><description>移除水印软件安装</description><pubDate>Sat, 11 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;WatermarkRemover-AI 安装与使用教程&lt;/h1&gt;
&lt;p&gt;本教程将指导你如何在 Windows 系统上安装和运行基于 AI 的去水印工具 &lt;strong&gt;WatermarkRemover-AI&lt;/strong&gt;。&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;📋 前置要求&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Windows 操作系统&lt;/li&gt;
&lt;li&gt;网络连接（建议挂代理以加速依赖下载）&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤一：下载项目代码&lt;/h2&gt;
&lt;p&gt;访问 GitHub 仓库下载源代码：&lt;/p&gt;
&lt;p&gt;🔗 &lt;a href=&quot;https://github.com/D-Ogi/WatermarkRemover-AI&quot;&gt;https://github.com/D-Ogi/WatermarkRemover-AI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;点击页面右上角的 &lt;strong&gt;Code&lt;/strong&gt; → &lt;strong&gt;Download ZIP&lt;/strong&gt;，解压到本地文件夹。&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤二：安装 Python 3.11&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;重要提示&lt;/strong&gt;：本项目依赖 &lt;code&gt;Pillow==9.5.0&lt;/code&gt;，该版本仅支持 Python 3.11，请务必安装正确版本！&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;访问 Python 官方下载页面：
🔗 &lt;a href=&quot;https://www.python.org/downloads/windows/&quot;&gt;https://www.python.org/downloads/windows/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;下载并安装 &lt;strong&gt;Python 3.11.x&lt;/strong&gt; 版本&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;安装时务必勾选&lt;/strong&gt;：&lt;code&gt;Add Python to PATH&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://docs.python.org/3/_images/win_installer.png&quot; alt=&quot;安装选项示意图&quot; /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;验证安装是否成功：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;py -3.11 --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;应显示类似输出：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 3.11.x
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤三：建立虚拟环境&lt;/h2&gt;
&lt;p&gt;打开 CMD 终端，依次执行以下命令：&lt;/p&gt;
&lt;h3&gt;1. 创建虚拟环境&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;py -3.11 -m venv wm_env
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 激活虚拟环境（CMD 方式）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;wm_env\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. 激活虚拟环境（PowerShell 方式，如 CMD 方式无效）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;.\wm_env\Scripts\Activate.ps1
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;提示&lt;/strong&gt;：激活成功后，命令行前缀会显示 &lt;code&gt;(wm_env)&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;4. 安装指定版本的 Pillow&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;pip install Pillow==9.5.0
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤四：安装 IOPaint&lt;/h2&gt;
&lt;p&gt;在已激活的虚拟环境中执行：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install iopaint
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤五：修改配置文件&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;重要步骤&lt;/strong&gt;：在运行安装前需要修改 &lt;code&gt;requirements.txt&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;打开项目文件夹中的 &lt;code&gt;requirements.txt&lt;/code&gt; 文件&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;找到第 26 行（&lt;code&gt;PyGObject&lt;/code&gt;）&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;注释掉该行&lt;/strong&gt;，在前面添加 &lt;code&gt;#&lt;/code&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- PyGObject==3.44.1
+ # PyGObject==3.44.1
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;保存文件&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤六：运行安装脚本&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;进入 WatermarkRemover-AI 项目文件夹&lt;/li&gt;
&lt;li&gt;双击运行 &lt;code&gt;setup.bat&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;🌐 &lt;strong&gt;建议&lt;/strong&gt;：挂代理运行，否则部分依赖包可能因网络问题下载失败&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;等待安装完成...&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;步骤七：启动程序&lt;/h2&gt;
&lt;p&gt;安装完成后，双击运行 &lt;code&gt;run.bat&lt;/code&gt; 即可启动去水印工具。&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;🎯 快速命令汇总&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;# 验证 Python 版本
py -3.11 --version

# 创建虚拟环境
py -3.11 -m venv wm_env

# 激活虚拟环境 (CMD)
wm_env\Scripts\activate.bat

# 激活虚拟环境 (PowerShell)
.\wm_env\Scripts\Activate.ps1

# 安装依赖
pip install Pillow==9.5.0
pip install iopaint

# 运行程序
setup.bat  # 首次安装
run.bat    # 日常使用
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h2&gt;❗ 常见问题&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;问题&lt;/th&gt;
&lt;th&gt;解决方案&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python 版本错误&lt;/td&gt;
&lt;td&gt;确认安装的是 3.11 版本，并使用 &lt;code&gt;py -3.11&lt;/code&gt; 命令&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pillow 安装失败&lt;/td&gt;
&lt;td&gt;检查 Python 版本是否为 3.11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;依赖下载慢/失败&lt;/td&gt;
&lt;td&gt;挂代理或更换 pip 镜像源&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PowerShell 执行策略限制&lt;/td&gt;
&lt;td&gt;以管理员身份运行 &lt;code&gt;Set-ExecutionPolicy RemoteSigned&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyGObject 报错&lt;/td&gt;
&lt;td&gt;确认已注释 requirements.txt 第 26 行&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr /&gt;
&lt;h2&gt;📁 项目结构参考&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;WatermarkRemover-AI/
├── wm_env/              # 虚拟环境文件夹（自动生成）
├── setup.bat            # 安装脚本
├── run.bat              # 启动脚本
├── requirements.txt     # 依赖配置文件（需修改）
└── ...                  # 其他项目文件
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h2&gt;🔗 相关链接&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;项目仓库：&lt;a href=&quot;https://github.com/D-Ogi/WatermarkRemover-AI&quot;&gt;https://github.com/D-Ogi/WatermarkRemover-AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Python 下载：&lt;a href=&quot;https://www.python.org/downloads/windows/&quot;&gt;https://www.python.org/downloads/windows/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;教程生成时间：2026-04-11&lt;/em&gt;&lt;/p&gt;
</content:encoded></item><item><title>第五天日记</title><link>https://note.xuqiangbao.xyz/posts/5day/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/5day/</guid><description>5day</description><pubDate>Tue, 24 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;📅 每日打卡&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;🏋️ 深蹲：4组&lt;/li&gt;
&lt;li&gt;💪 跪姿俯卧撑：4组&lt;/li&gt;
&lt;li&gt;🧘 平板支撑：3组&lt;/li&gt;
&lt;li&gt;📚 百词斩打卡：30个单词&lt;/li&gt;
&lt;li&gt;🦉 多邻国打卡&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;😄 今日趣事&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;下大雨了，裤子被淋湿了TOT；没什么趣事，依旧日常打卡。
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>第四天日记</title><link>https://note.xuqiangbao.xyz/posts/4day/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/4day/</guid><description>4day</description><pubDate>Thu, 19 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;📅 每日打卡&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;🏋️ 深蹲：4组&lt;/li&gt;
&lt;li&gt;💪 跪姿俯卧撑：4组&lt;/li&gt;
&lt;li&gt;🧘 平板支撑：3组&lt;/li&gt;
&lt;li&gt;📚 百词斩打卡：30个单词&lt;/li&gt;
&lt;li&gt;🦉 多邻国打卡&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;😄 今日趣事&lt;/h1&gt;
&lt;p&gt;1、今天配合POE装置CCR开箱，走了10公里，运动量十足；
2、软考中级书籍也到了，也可以准备学习起来了📚；
3、今天发现KIMI（月之暗面）的大模型是真的强，我可能用claude用的比较少，所以觉得KIMI蛮好用的;&lt;/p&gt;
</content:encoded></item><item><title>第三天日记</title><link>https://note.xuqiangbao.xyz/posts/3day/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/3day/</guid><description>3day</description><pubDate>Wed, 18 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;📅 每日打卡&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;🏋️ 深蹲：4组&lt;/li&gt;
&lt;li&gt;💪 跪姿俯卧撑：4组&lt;/li&gt;
&lt;li&gt;🧘 平板支撑：3组&lt;/li&gt;
&lt;li&gt;📚 百词斩打卡：30个单词&lt;/li&gt;
&lt;li&gt;🦉 多邻国打卡&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;😄 今日趣事&lt;/h1&gt;
&lt;p&gt;今天突然有了考软考的想法，也不知道能不能坚持下来，先买本嵌入式的书把！&lt;/p&gt;
</content:encoded></item><item><title>第二天日记</title><link>https://note.xuqiangbao.xyz/posts/2day/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/2day/</guid><description>2day</description><pubDate>Tue, 17 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;📅 每日打卡&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;🏋️ 深蹲：4组&lt;/li&gt;
&lt;li&gt;💪 跪姿俯卧撑：4组&lt;/li&gt;
&lt;li&gt;🧘 平板支撑：3组&lt;/li&gt;
&lt;li&gt;📚 百词斩打卡：30个单词&lt;/li&gt;
&lt;li&gt;🦉 多邻国打卡&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;😄 今日趣事&lt;/h1&gt;
&lt;p&gt;日常两点一线，今天发现炼化的体育馆🏟非炼化员工也可以进，于是白嫖场地一小时，打了一小会乒乓球🏓。&lt;/p&gt;
</content:encoded></item><item><title>第一天日记</title><link>https://note.xuqiangbao.xyz/posts/1day/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/1day/</guid><description>1day</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;📅 每日打卡&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;🏋️ 深蹲：4组&lt;/li&gt;
&lt;li&gt;💪 跪姿俯卧撑：4组&lt;/li&gt;
&lt;li&gt;🧘 平板支撑：3组&lt;/li&gt;
&lt;li&gt;📚 百词斩打卡：30个单词&lt;/li&gt;
&lt;li&gt;🦉 多邻国打卡&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;😄 今日趣事&lt;/h1&gt;
&lt;p&gt;日常两点一线，趣事就是今天发工资了 💰&lt;/p&gt;
</content:encoded></item><item><title>我的第一篇文章</title><link>https://note.xuqiangbao.xyz/posts/test/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/test/</guid><description>这是我的第一篇博客</description><pubDate>Sun, 15 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;使用 GitHub Pages 免费部署 Astro + Fuwari 博客（完整指南）&lt;/h1&gt;
&lt;p&gt;本文档将引导你&lt;strong&gt;在本地电脑&lt;/strong&gt;完成博客的搭建、配置和发布，最终通过 GitHub Pages 免费托管，并绑定自己的域名。全程无需云服务器，告别 Nginx 配置烦恼。&lt;/p&gt;
&lt;h2&gt;📦 第一步：本地环境准备&lt;/h2&gt;
&lt;h3&gt;1.1 安装 Git&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;下载&lt;/strong&gt;：访问 &lt;a href=&quot;https://git-scm.com/downloads&quot;&gt;Git 官网&lt;/a&gt;，选择对应操作系统的版本。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;安装&lt;/strong&gt;：一路默认，所有选项保持默认即可。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;验证&lt;/strong&gt;：打开命令行（Windows 按 &lt;code&gt;Win+R&lt;/code&gt; 输入 &lt;code&gt;cmd&lt;/code&gt;，Mac 打开终端），输入：&lt;pre&gt;&lt;code&gt;git --version
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;应显示类似 git version 2.40.0 的版本号。&lt;/p&gt;
&lt;p&gt;1.2 安装 Node.js（LTS 版本）
下载：访问 Node.js 官网，点击左侧绿色的 LTS 按钮下载安装包。&lt;/p&gt;
&lt;p&gt;安装：一路默认，务必勾选“自动安装必要的工具”（如果有）。&lt;/p&gt;
&lt;p&gt;验证：&lt;/p&gt;
&lt;p&gt;bash
node --version   # 应显示 v20.x.x
npm --version    # 应显示 10.x.x
1.3 安装 pnpm（更快、更省空间的包管理器）
在命令行中执行：&lt;/p&gt;
&lt;p&gt;bash
npm install -g pnpm
pnpm --version   # 验证
🚀 第二步：获取 Fuwari 博客模板
方法 A：使用 Git 克隆（推荐，方便后续更新）
bash&lt;/p&gt;
&lt;h1&gt;切换到你想存放博客的目录，例如桌面&lt;/h1&gt;
&lt;p&gt;cd ~/Desktop
git clone https://github.com/saicaca/fuwari.git my-blog
cd my-blog
注意：如果 git clone 因网络问题失败，请使用方法 B。&lt;/p&gt;
&lt;p&gt;方法 B：手动下载 ZIP（网络不稳定时使用）
打开 Fuwari GitHub 仓库。&lt;/p&gt;
&lt;p&gt;点击绿色 Code 按钮 → 选择 Download ZIP。&lt;/p&gt;
&lt;p&gt;解压到本地文件夹（例如 ~/Desktop/my-blog）。&lt;/p&gt;
&lt;p&gt;打开命令行，进入该文件夹：&lt;/p&gt;
&lt;p&gt;bash
cd ~/Desktop/my-blog
🛠️ 第三步：安装依赖并本地预览
bash&lt;/p&gt;
&lt;h1&gt;安装项目依赖&lt;/h1&gt;
&lt;p&gt;pnpm install&lt;/p&gt;
&lt;h1&gt;本地预览（会启动一个开发服务器）&lt;/h1&gt;
&lt;p&gt;pnpm dev
命令行会显示 Local: http://localhost:4321/。打开浏览器访问该地址，即可看到博客初始效果。按 Ctrl+C 可停止预览。&lt;/p&gt;
&lt;p&gt;🎨 第四步：个性化配置
4.1 修改博客基本信息
用文本编辑器（如 VS Code、记事本）打开 src/config.ts 文件，修改以下字段：&lt;/p&gt;
&lt;p&gt;ts
title: &quot;你的博客标题&quot;,      // 例如 &quot;许强的博客&quot;
subtitle: &quot;你的副标题&quot;,     // 例如 &quot;记录生活与技术&quot;
lang: &quot;zh-CN&quot;,              // 改为中文
themeColor: &quot;blue&quot;,         // 可选颜色：blue、green、pink 等
保存文件。&lt;/p&gt;
&lt;p&gt;4.2 清理示例文章（可选）
删除 src/content/posts/ 目录下的所有 .md 文件（这些是别人的示例文章）。&lt;/p&gt;
&lt;p&gt;4.3 修改构建配置（为绑定自定义域名做准备）
打开 astro.config.mjs 文件，修改 site 字段：&lt;/p&gt;
&lt;p&gt;javascript
export default defineConfig({
site: &apos;https://你的用户名.github.io&apos;,  // 如果你暂不绑定域名，可先保持这样
// 如果你有自定义域名，请改为你的域名，例如 &apos;https://blog.xuqiangbao.xyz&apos;
base: &apos;/&apos;,
// ... 其他配置不要动
});
保存文件。&lt;/p&gt;
&lt;p&gt;📦 第五步：构建静态网站
bash
pnpm build
构建完成后，会生成一个 dist 文件夹，里面就是你的整个博客的静态文件（后续要上传到 GitHub）。&lt;/p&gt;
&lt;p&gt;🌐 第六步：创建 GitHub 仓库
登录 GitHub。&lt;/p&gt;
&lt;p&gt;点击右上角 + → New repository。&lt;/p&gt;
&lt;p&gt;Repository name 输入一个名字，例如 my-blog（注意：不要勾选 “Add a README file”、“Add .gitignore” 或 “Choose a license”，保持仓库完全为空）。&lt;/p&gt;
&lt;p&gt;选择 Public（公开仓库，免费）。&lt;/p&gt;
&lt;p&gt;点击 Create repository。&lt;/p&gt;
&lt;p&gt;🔧 第七步：初始化本地 Git 并推送代码
7.1 如果之前未初始化 Git 仓库
bash&lt;/p&gt;
&lt;h1&gt;在 my-blog 目录下执行&lt;/h1&gt;
&lt;p&gt;git init
git add .
git commit -m &quot;Initial commit&quot;
7.2 设置远程仓库地址
bash
git remote add origin https://github.com/你的用户名/my-blog.git
注意：如果提示 remote origin already exists，可先执行 git remote remove origin 再重新添加。&lt;/p&gt;
&lt;p&gt;7.3 推送代码
bash&lt;/p&gt;
&lt;h1&gt;如果你的本地分支名为 master，将其重命名为 main（GitHub 默认分支为 main）&lt;/h1&gt;
&lt;p&gt;git branch -M main&lt;/p&gt;
&lt;h1&gt;推送&lt;/h1&gt;
&lt;p&gt;git push -u origin main
网络问题处理：如果推送失败（如 Failed to connect to github.com port 443），可尝试：&lt;/p&gt;
&lt;p&gt;配置代理（假设代理端口为 7890）：&lt;/p&gt;
&lt;p&gt;bash
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
或者使用 SSH 方式（需先配置 SSH Key，参考 GitHub 文档）：&lt;/p&gt;
&lt;p&gt;bash
git remote set-url origin git@github.com:你的用户名/my-blog.git
git push -u origin main
推送成功后，刷新 GitHub 仓库页面，应该能看到你的代码。&lt;/p&gt;
&lt;p&gt;⚙️ 第八步：配置 GitHub Pages 自动部署
8.1 创建 GitHub Actions 工作流
在本地项目根目录创建文件夹 .github/workflows，然后创建文件 deploy.yml：&lt;/p&gt;
&lt;p&gt;bash
mkdir -p .github/workflows
用文本编辑器打开 .github/workflows/deploy.yml，粘贴以下内容：&lt;/p&gt;
&lt;p&gt;yaml
name: Deploy to GitHub Pages&lt;/p&gt;
&lt;p&gt;on:
push:
branches: [ main ]&lt;/p&gt;
&lt;p&gt;jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: false
- run: pnpm install
- run: pnpm build
- uses: actions/upload-pages-artifact@v3
with:
path: ./dist&lt;/p&gt;
&lt;p&gt;deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
8.2 提交并推送工作流文件
bash
git add .github
git commit -m &quot;Add GitHub Actions workflow&quot;
git push
8.3 在 GitHub 上启用 Pages
进入 GitHub 仓库，点击 Settings → Pages。&lt;/p&gt;
&lt;p&gt;在 Source 下选择 GitHub Actions（通常会自动检测到）。&lt;/p&gt;
&lt;p&gt;等待几分钟，第一次部署完成后，你会看到一条信息：Your site is live at https://你的用户名.github.io/my-blog。&lt;/p&gt;
&lt;p&gt;此时访问该地址，即可看到你的博客！&lt;/p&gt;
&lt;p&gt;🔗 第九步：绑定自定义域名（可选）
假设你的域名是 blog.xuqiangbao.xyz，且已解析到服务器 IP（现在需要改为 CNAME 记录）。&lt;/p&gt;
&lt;p&gt;9.1 在 GitHub 仓库设置中添加域名
进入仓库 Settings → Pages。&lt;/p&gt;
&lt;p&gt;在 Custom domain 输入框中输入 blog.xuqiangbao.xyz，点击 Save。&lt;/p&gt;
&lt;p&gt;GitHub 会自动在仓库根目录创建一个 CNAME 文件（包含你的域名），请确保该文件被提交到 main 分支（工作流构建时会包含它）。&lt;/p&gt;
&lt;p&gt;9.2 修改域名 DNS 解析
登录你的域名服务商（如阿里云、腾讯云、Cloudflare 等），为 blog.xuqiangbao.xyz 添加一条 CNAME 记录：&lt;/p&gt;
&lt;p&gt;主机记录：blog&lt;/p&gt;
&lt;p&gt;记录类型：CNAME&lt;/p&gt;
&lt;p&gt;记录值：你的用户名.github.io（例如 xuqiangbao.github.io）&lt;/p&gt;
&lt;p&gt;TTL：默认即可&lt;/p&gt;
&lt;p&gt;如果之前有 A 记录指向服务器 IP，记得删除或暂停。&lt;/p&gt;
&lt;p&gt;9.3 等待生效
DNS 解析可能需要几分钟到几小时生效。生效后访问 https://blog.xuqiangbao.xyz，就能看到你的博客，且 GitHub 会自动颁发 SSL 证书。&lt;/p&gt;
&lt;p&gt;✍️ 第十步：日常更新文章
在本地 src/content/posts/ 下创建新的 Markdown 文件，文件名任意（如 hello-world.md），内容格式如下：&lt;/p&gt;
&lt;h2&gt;markdown&lt;/h2&gt;
&lt;h2&gt;title: 我的第一篇文章
published: 2026-03-15
description: 这是我的第一篇博客
tags: [生活, 记录]
category: 日常
draft: false&lt;/h2&gt;
&lt;p&gt;这里是正文，用 &lt;strong&gt;Markdown&lt;/strong&gt; 写。
可选：本地预览（检查效果）：&lt;/p&gt;
&lt;p&gt;bash
pnpm dev
提交并推送：&lt;/p&gt;
&lt;p&gt;bash
git add .
git commit -m &quot;新文章：xxx&quot;
git push
等待几分钟，GitHub Actions 会自动构建并部署，之后访问你的域名就能看到新文章。&lt;/p&gt;
&lt;p&gt;❓ 常见问题排查
Q1：git push 时提示 remote origin already exists
bash&lt;/p&gt;
&lt;h1&gt;先查看当前远程地址&lt;/h1&gt;
&lt;p&gt;git remote -v&lt;/p&gt;
&lt;h1&gt;如果地址不对，更新为新地址&lt;/h1&gt;
&lt;p&gt;git remote set-url origin https://github.com/你的用户名/my-blog.git&lt;/p&gt;
&lt;h1&gt;或者删除后重新添加&lt;/h1&gt;
&lt;p&gt;git remote remove origin
git remote add origin https://github.com/你的用户名/my-blog.git
Q2：git push 时提示 Repository not found
确保你已经在 GitHub 上创建了同名的仓库（my-blog），并且远程地址中的用户名和仓库名完全正确。&lt;/p&gt;
&lt;p&gt;Q3：推送时遇到 Failed to connect to github.com port 443
网络问题，尝试：&lt;/p&gt;
&lt;p&gt;配置代理（见第七步）。&lt;/p&gt;
&lt;p&gt;使用 SSH 方式（需配置 SSH Key）。&lt;/p&gt;
&lt;p&gt;切换网络（如手机热点）重试。&lt;/p&gt;
&lt;p&gt;Q4：GitHub Actions 部署失败
检查 deploy.yml 文件是否完整、正确。&lt;/p&gt;
&lt;p&gt;查看 Actions 日志（在仓库的 Actions 标签页），根据错误信息调整。&lt;/p&gt;
&lt;p&gt;Q5：自定义域名访问显示 404
确认 DNS 解析已生效（可用 ping blog.xuqiangbao.xyz 查看解析到的 IP）。&lt;/p&gt;
&lt;p&gt;确认 GitHub 仓库的 Settings → Pages 中已正确填写自定义域名，且 CNAME 文件存在于仓库根目录。&lt;/p&gt;
</content:encoded></item><item><title>Simple Guides for Fuwari</title><link>https://note.xuqiangbao.xyz/posts/guide/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/guide/</guid><description>How to use this blog template.</description><pubDate>Mon, 01 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Cover image source: &lt;a href=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This blog template is built with &lt;a href=&quot;https://astro.build/&quot;&gt;Astro&lt;/a&gt;. For the things that are not mentioned in this guide, you may find the answers in the &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro Docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Front-matter of Posts&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;published&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The date the post was published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A short description of the post. Displayed on index page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The cover image path of the post.&amp;lt;br/&amp;gt;1. Start with &lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;: Use web image&amp;lt;br/&amp;gt;2. Start with &lt;code&gt;/&lt;/code&gt;: For image in &lt;code&gt;public&lt;/code&gt; dir&amp;lt;br/&amp;gt;3. With none of the prefixes: Relative to the markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The tags of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The category of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If this post is still a draft, which won&apos;t be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Where to Place the Post Files&lt;/h2&gt;
&lt;p&gt;Your post files should be placed in &lt;code&gt;src/content/posts/&lt;/code&gt; directory. You can also create sub-directories to better organize your posts and assets.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.png
    └── index.md
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Markdown Example</title><link>https://note.xuqiangbao.xyz/posts/markdown/</link><guid isPermaLink="true">https://note.xuqiangbao.xyz/posts/markdown/</guid><description>A simple example of a Markdown blog post.</description><pubDate>Sun, 01 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;An h1 header&lt;/h1&gt;
&lt;p&gt;Paragraphs are separated by a blank line.&lt;/p&gt;
&lt;p&gt;2nd paragraph. &lt;em&gt;Italic&lt;/em&gt;, &lt;strong&gt;bold&lt;/strong&gt;, and &lt;code&gt;monospace&lt;/code&gt;. Itemized lists
look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;this one&lt;/li&gt;
&lt;li&gt;that one&lt;/li&gt;
&lt;li&gt;the other one&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Block quotes are
written like so.&lt;/p&gt;
&lt;p&gt;They can span multiple paragraphs,
if you like.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., &quot;it&apos;s all
in chapters 12--14&quot;). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺&lt;/p&gt;
&lt;h2&gt;An h2 header&lt;/h2&gt;
&lt;p&gt;Here&apos;s a numbered list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;first item&lt;/li&gt;
&lt;li&gt;second item&lt;/li&gt;
&lt;li&gt;third item&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here&apos;s a code sample:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define foobar() {
    print &quot;Welcome to flavor country!&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(which makes copying &amp;amp; pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;An h3 header&lt;/h3&gt;
&lt;p&gt;Now a nested list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, get these ingredients:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;carrots&lt;/li&gt;
&lt;li&gt;celery&lt;/li&gt;
&lt;li&gt;lentils&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boil some water.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dump everything in the pot and follow
this algorithm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; find wooden spoon
 uncover pot
 stir
 cover pot
 balance wooden spoon precariously on pot handle
 wait 10 minutes
 goto first step (or shut off burner when done)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not bump wooden spoon or it will fall.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).&lt;/p&gt;
&lt;p&gt;Here&apos;s a link to &lt;a href=&quot;http://foo.bar&quot;&gt;a website&lt;/a&gt;, to a &lt;a href=&quot;local-doc.html&quot;&gt;local
doc&lt;/a&gt;, and to a &lt;a href=&quot;#an-h2-header&quot;&gt;section heading in the current
doc&lt;/a&gt;. Here&apos;s a footnote [^1].&lt;/p&gt;
&lt;p&gt;[^1]: Footnote text goes here.&lt;/p&gt;
&lt;p&gt;Tables can look like this:&lt;/p&gt;
&lt;p&gt;size material color&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;9 leather brown
10 hemp canvas natural
11 glass transparent&lt;/p&gt;
&lt;p&gt;Table: Shoes, their sizes, and what they&apos;re made of&lt;/p&gt;
&lt;p&gt;(The above is the caption for the table.) Pandoc also supports
multi-line tables:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;keyword text&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;red Sunsets, apples, and
other red or reddish
things.&lt;/p&gt;
&lt;p&gt;green Leaves, grass, frogs
and other things it&apos;s
not easy being.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A horizontal rule follows.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Here&apos;s a definition list:&lt;/p&gt;
&lt;p&gt;apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There&apos;s no &quot;e&quot; in tomatoe.&lt;/p&gt;
&lt;p&gt;Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)&lt;/p&gt;
&lt;p&gt;Here&apos;s a &quot;line block&quot;:&lt;/p&gt;
&lt;p&gt;| Line one
| Line too
| Line tree&lt;/p&gt;
&lt;p&gt;and images can be specified like so:&lt;/p&gt;
&lt;p&gt;Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:&lt;/p&gt;
&lt;p&gt;$$I = \int \rho R^{2} dV$$&lt;/p&gt;
&lt;p&gt;$$
\begin{equation*}
\pi
=3.1415926535
;8979323846;2643383279;5028841971;6939937510;5820974944
;5923078164;0628620899;8628034825;3421170679;\ldots
\end{equation*}
$$&lt;/p&gt;
&lt;p&gt;And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.&lt;/p&gt;
</content:encoded></item></channel></rss>