<?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>记录学习与生活的点滴</description><link>https://www.xfengling.me/</link><language>zh-CN</language><item><title>我用 Astro + Mizuki 搭了一个自己的博客</title><link>https://www.xfengling.me/posts/build-my-blog-with-astro/</link><guid isPermaLink="true">https://www.xfengling.me/posts/build-my-blog-with-astro/</guid><description>从一个空目录到能在浏览器里打开的博客：技术选型的想法、实际敲过的命令，以及路上踩到的几个坑。</description><pubDate>Sun, 18 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;这个博客是从零开始搭的。这篇文章把整个过程记下来，一来以后自己回头看有个参照，二来如果有人也想搭一个，可以少走一点弯路。&lt;/p&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;为什么想自己搭一个&quot;&gt;为什么想自己搭一个&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%83%B3%E8%87%AA%E5%B7%B1%E6%90%AD%E4%B8%80%E4%B8%AA&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;起因很普通：想有个地方放自己的东西。&lt;/p&gt;&lt;p&gt;写过的笔记散在各种 App 里，聊天记录里也有，过一阵就找不到了。我想要的是一个&lt;strong&gt;自己能完全掌控、又几乎不用维护&lt;/strong&gt;的地方——把文章写成纯文本文件存在本地，剩下的交给构建工具。&lt;/p&gt;&lt;p&gt;所以定下三条要求：&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;不写代码也能维护（我只会照着说明改配置文件）&lt;/li&gt;
&lt;li&gt;没有数据库、没有后台、没有服务器要续费&lt;/li&gt;
&lt;li&gt;打开要好看，毕竟是自己的地方&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;选型为什么最后是-astro--mizuki&quot;&gt;选型：为什么最后是 Astro + Mizuki&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E9%80%89%E5%9E%8B%E4%B8%BA%E4%BB%80%E4%B9%88%E6%9C%80%E5%90%8E%E6%98%AF-astro--mizuki&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;先试的思路是「现成的博客框架 + 现成的主题」，因为自己写前端不现实。比较下来大致是这样：&lt;/p&gt;&lt;div class=&quot;table-wrapper&quot;&gt;


































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;方案&lt;/th&gt;&lt;th&gt;二次元主题多不多&lt;/th&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;&lt;strong&gt;Astro&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;最多&lt;/td&gt;&lt;td&gt;低&lt;/td&gt;&lt;td&gt;✅ 选了它&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hexo&lt;/td&gt;&lt;td&gt;多，但风格偏旧&lt;/td&gt;&lt;td&gt;低&lt;/td&gt;&lt;td&gt;生态在退潮&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hugo&lt;/td&gt;&lt;td&gt;很少&lt;/td&gt;&lt;td&gt;高（要改模板）&lt;/td&gt;&lt;td&gt;放弃&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Next.js&lt;/td&gt;&lt;td&gt;少，基本要自建&lt;/td&gt;&lt;td&gt;高&lt;/td&gt;&lt;td&gt;放弃&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;关键其实不是 Astro 本身，而是&lt;strong&gt;好看的二次元风格主题几乎只在 Astro 生态里&lt;/strong&gt;。这一条直接决定了其他选项全部出局。&lt;/p&gt;&lt;p&gt;主题选的是 Mizuki，它基于 Fuwari 改的，带有 Material Design 3 的观感，评论、搜索、RSS 这些能力都接好了，需要改的东西集中在一个目录里。&lt;/p&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;实际动手的过程&quot;&gt;实际动手的过程&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E5%AE%9E%E9%99%85%E5%8A%A8%E6%89%8B%E7%9A%84%E8%BF%87%E7%A8%8B&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;整个搭建只有几条命令。先把主题仓库拉下来——这里用浅克隆，因为完整历史体积太大，国内网络经常传一半就断：&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;bash&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:80ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;clone&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;--depth&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;--single-branch&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;https://github.com/matsuzaka-yuki/Mizuki.git&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p&gt;然后装依赖。注意 npm 官方源在这台电脑上连不上，要换成国内镜像：&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;bash&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:42ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;# .npmrc 里写一行就够&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;# registry=https://registry.npmmirror.com/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;pnpm&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p&gt;装完之后：&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;bash&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:28ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;pnpm&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;dev&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;# 本地预览，改文件会自动刷新&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;pnpm&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;build&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;# 生成最终要发布的静态文件&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;pnpm dev&lt;/code&gt; 起来之后打开 &lt;code&gt;http://localhost:3000/&lt;/code&gt;，看到完整的页面，这一步就成了。&lt;/p&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;改配置其实只动一个目录&quot;&gt;改配置：其实只动一个目录&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E6%94%B9%E9%85%8D%E7%BD%AE%E5%85%B6%E5%AE%9E%E5%8F%AA%E5%8A%A8%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;站点身份信息全在 &lt;code&gt;src/config/&lt;/code&gt; 里，不用碰页面代码。比如站点名称和副标题：&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;ts&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;ts&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:50ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;siteConfig&lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;SiteConfig&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#BF3441;--1:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot; style=&quot;--ecIndent:2ch&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;title: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&quot;我的博客&quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot; style=&quot;--ecIndent:2ch&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;subtitle: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&quot;记录学习与生活的点滴&quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot; style=&quot;--ecIndent:2ch&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;4&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;siteURL: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&quot;https://www.xfengling.me/&quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#616972;--1:#99A0A6&quot;&gt;// 换成自己的域名&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot; style=&quot;--ecIndent:2ch&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;siteStartDate: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&quot;2026-10-17&quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot; style=&quot;--ecIndent:2ch&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;6&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;timeZone: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;&quot;Asia/Shanghai&quot;&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;7&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p&gt;写文章的归类规则也很简单，只有两个分类，标签交叉索引：&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;yaml&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:26ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;文章标题&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;published&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;2026-10-18&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;4&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;一句话摘要，会显示在卡片上&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;tags&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;Astro&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;建站&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;6&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;category&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;技术&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;7&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#1E7734;--1:#85E89D&quot;&gt;draft&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;8&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;踩到的几个坑&quot;&gt;踩到的几个坑&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E8%B8%A9%E5%88%B0%E7%9A%84%E5%87%A0%E4%B8%AA%E5%9D%91&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;section class=&quot;markdown-section&quot;&gt;&lt;h3 id=&quot;坑一全局-git-配置里有失效的代理规则&quot;&gt;坑一：全局 git 配置里有失效的代理规则&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E5%9D%91%E4%B8%80%E5%85%A8%E5%B1%80-git-%E9%85%8D%E7%BD%AE%E9%87%8C%E6%9C%89%E5%A4%B1%E6%95%88%E7%9A%84%E4%BB%A3%E7%90%86%E8%A7%84%E5%88%99&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;所有从 GitHub 拉代码的操作都会失败，而且报错信息完全看不出原因。最后发现是 &lt;code&gt;.gitconfig&lt;/code&gt; 里有一条指向已经停止服务的代理的重写规则，删掉就好。&lt;/p&gt;&lt;blockquote class=&quot;admonition bdm-warning&quot;&gt;&lt;div class=&quot;bdm-title&quot;&gt;改全局配置前先备份&lt;/div&gt;&lt;p&gt;&lt;code&gt;git config --global&lt;/code&gt; 的改动会影响这台机器上所有仓库。删之前先复制一份 &lt;code&gt;.gitconfig&lt;/code&gt; 出来。&lt;/p&gt;&lt;/blockquote&gt;&lt;/section&gt;&lt;section class=&quot;markdown-section&quot;&gt;&lt;h3 id=&quot;坑二依赖下载慢到以为卡死&quot;&gt;坑二：依赖下载慢到以为卡死&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E5%9D%91%E4%BA%8C%E4%BE%9D%E8%B5%96%E4%B8%8B%E8%BD%BD%E6%85%A2%E5%88%B0%E4%BB%A5%E4%B8%BA%E5%8D%A1%E6%AD%BB&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;第一次装依赖花了五分钟。把 npm 源换成国内镜像之后降到两分钟左右。第二次再装因为本地有缓存，就快很多了。&lt;/p&gt;&lt;/section&gt;&lt;section class=&quot;markdown-section&quot;&gt;&lt;h3 id=&quot;坑三构建最后一步的搜索索引失败&quot;&gt;坑三：构建最后一步的搜索索引失败&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E5%9D%91%E4%B8%89%E6%9E%84%E5%BB%BA%E6%9C%80%E5%90%8E%E4%B8%80%E6%AD%A5%E7%9A%84%E6%90%9C%E7%B4%A2%E7%B4%A2%E5%BC%95%E5%A4%B1%E8%B4%A5&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;pnpm build&lt;/code&gt; 会在最后生成站内搜索索引，需要联网下载一个二进制文件，这一步在本机失败了。&lt;/p&gt;&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame&quot; data-language=&quot;text&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;text&quot; class=&quot;wrap&quot; style=&quot;--ecMaxLine:73ch&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8&quot;&gt;Failed to install either of [pagefind_extended, pagefind].&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8&quot;&gt;Most likely the platform windows-x64 is not yet a supported architecture.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy-btn-icon&quot;&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;&lt;p&gt;页面本身是全部构建成功的，只是搜索用不了。搜索属于后面单独处理的事，先放着。&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;现在的写作流程&quot;&gt;现在的写作流程&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E7%8E%B0%E5%9C%A8%E7%9A%84%E5%86%99%E4%BD%9C%E6%B5%81%E7%A8%8B&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这是我最在意的部分——如果写一篇文章要折腾十分钟，我肯定坚持不下来。现在的流程是：&lt;/p&gt;&lt;div class=&quot;mermaid-diagram-container&quot;&gt;&lt;div class=&quot;mermaid-wrapper&quot; id=&quot;mermaid-q20k4z&quot;&gt;&lt;div class=&quot;mermaid&quot; data-mermaid-code=&quot;graph LR
    A[新建 md 文件] --&amp;gt; B[写内容]
    B --&amp;gt; C[本地预览]
    C --&amp;gt; D[git push]
    D --&amp;gt; E[自动发布]&quot;&gt;graph LR
    A[新建 md 文件] --&amp;gt; B[写内容]
    B --&amp;gt; C[本地预览]
    C --&amp;gt; D[git push]
    D --&amp;gt; E[自动发布]&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;在 &lt;code&gt;src/content/posts/&lt;/code&gt; 下新建一个 &lt;code&gt;.md&lt;/code&gt; 文件&lt;/li&gt;
&lt;li&gt;打开编辑器，在文件开头填标题、日期、分类、标签&lt;/li&gt;
&lt;li&gt;正文用 Markdown 写&lt;/li&gt;
&lt;li&gt;保存，浏览器里立刻能看到效果&lt;/li&gt;
&lt;li&gt;满意了 &lt;code&gt;git push&lt;/code&gt;，托管平台自动构建发布&lt;/li&gt;
&lt;/ol&gt;&lt;figure class=&quot;markdown-image-figure&quot;&gt;&lt;img alt=&quot;我的工作台&quot; title=&quot;晚上写东西的时候，桌上差不多就是这个样子&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; style=&quot;width:75%;display:block;margin-inline:auto&quot; sizes=&quot;(min-width: 1000px) 1000px, 100vw&quot; data-astro-image=&quot;constrained&quot; data-astro-image-pos=&quot;center&quot; width=&quot;1000&quot; height=&quot;750&quot; src=&quot;https://www.xfengling.me/_astro/desk.Dgp0dTCB_ZD7GUS.webp&quot; srcset=&quot;https://www.xfengling.me/_astro/desk.Dgp0dTCB_Z1A91Nl.webp 640w, https://www.xfengling.me/_astro/desk.Dgp0dTCB_Zm3BUB.webp 750w, https://www.xfengling.me/_astro/desk.Dgp0dTCB_rLswE.webp 828w, https://www.xfengling.me/_astro/desk.Dgp0dTCB_ZD7GUS.webp 1000w&quot; /&gt;&lt;figcaption class=&quot;markdown-image-caption&quot;&gt;晚上写东西的时候，桌上差不多就是这个样子&lt;/figcaption&gt;&lt;/figure&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;接下来想做的事&quot;&gt;接下来想做的事&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/build-my-blog-with-astro/#%E6%8E%A5%E4%B8%8B%E6%9D%A5%E6%83%B3%E5%81%9A%E7%9A%84%E4%BA%8B&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;把首页头图和头像换成自己的图&lt;/li&gt;
&lt;li&gt;填一下项目、技能、时间线三个页面&lt;/li&gt;
&lt;li&gt;域名的事情等上线实测之后再说&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;博客搭好只是开始，真正的部分是把东西写出来。这一篇算第一块砖。&lt;/p&gt;&lt;/section&gt;</content:encoded></item><item><title>十月，开始记录</title><link>https://www.xfengling.me/posts/october-start-recording/</link><guid isPermaLink="true">https://www.xfengling.me/posts/october-start-recording/</guid><description>开博客这件事想了很久，终于在这个十月动手了。写点没什么用的东西，也算留下一点痕迹。</description><pubDate>Sun, 18 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;开博客这件事我想了大概有一年。&lt;/p&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;为什么一直没开始&quot;&gt;为什么一直没开始&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/october-start-recording/#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%80%E7%9B%B4%E6%B2%A1%E5%BC%80%E5%A7%8B&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;理由能列出一堆：没什么值得写的、写出来也没人看、排版太麻烦、坚持不下来。&lt;/p&gt;&lt;p&gt;后来发现这些理由其实都在回避同一件事——&lt;strong&gt;怕写得难看&lt;/strong&gt;。一旦把它当成「作品」，就永远觉得还没准备好。&lt;/p&gt;&lt;p&gt;前几天晚上忽然想通了：博客本来就不是作品，它更像个抽屉。写得烂也无所谓，反正抽屉里的东西不用给谁看。&lt;/p&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;这个十月&quot;&gt;这个十月&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/october-start-recording/#%E8%BF%99%E4%B8%AA%E5%8D%81%E6%9C%88&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;十月是最忙也最舒服的一个月。&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;课表不算满，但作业都是要花整晚那种&lt;/li&gt;
&lt;li&gt;图书馆四楼靠窗的位置很好，下午的光能照到桌子上&lt;/li&gt;
&lt;li&gt;买了一杯奶茶会坐在那里假装学习，实际上在发呆&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote class=&quot;admonition bdm-note&quot;&gt;&lt;div class=&quot;bdm-title&quot;&gt;关于秋天&lt;/div&gt;&lt;p&gt;我其实不太喜欢秋天，因为太短了。但秋天好看这件事没法否认。&lt;/p&gt;&lt;/blockquote&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;想在这里放什么&quot;&gt;想在这里放什么&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/october-start-recording/#%E6%83%B3%E5%9C%A8%E8%BF%99%E9%87%8C%E6%94%BE%E4%BB%80%E4%B9%88&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;不打算给这个博客定主题。目前想到的是这些：&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;上课学到的东西，用自己的话写一遍&lt;/li&gt;
&lt;li&gt;折腾电脑、软件装坏了的记录&lt;/li&gt;
&lt;li&gt;看书或者看番之后的一些碎想法&lt;/li&gt;
&lt;li&gt;没什么理由，就是想写的&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;image-grid&quot; data-columns=&quot;2&quot; style=&quot;--image-grid-columns:2;--image-grid-aspect-ratio:1 / 1;--image-grid-fit:cover&quot;&gt;&lt;figure class=&quot;image-grid__item&quot;&gt;&lt;a class=&quot;image-grid__link no-styling&quot; href=&quot;https://www.xfengling.me/images/posts/october/1.webp&quot; data-fancybox=&quot;image-grid-0&quot; data-no-swup=&quot;true&quot; data-caption=&quot;下午的光&quot;&gt;&lt;img src=&quot;https://www.xfengling.me/images/posts/october/1.webp&quot; alt=&quot;午后的桌子&quot; title=&quot;下午的光&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&gt;&lt;/a&gt;&lt;figcaption class=&quot;image-grid__caption&quot;&gt;下午的光&lt;/figcaption&gt;&lt;/figure&gt;&lt;figure class=&quot;image-grid__item&quot;&gt;&lt;a class=&quot;image-grid__link no-styling&quot; href=&quot;https://www.xfengling.me/images/posts/october/2.webp&quot; data-fancybox=&quot;image-grid-0&quot; data-no-swup=&quot;true&quot; data-caption=&quot;乱七八糟但自己知道东西在哪&quot;&gt;&lt;img src=&quot;https://www.xfengling.me/images/posts/october/2.webp&quot; alt=&quot;书桌一角&quot; title=&quot;乱七八糟但自己知道东西在哪&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; /&gt;&lt;/a&gt;&lt;figcaption class=&quot;image-grid__caption&quot;&gt;乱七八糟但自己知道东西在哪&lt;/figcaption&gt;&lt;/figure&gt;&lt;/div&gt;&lt;/section&gt;
&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;最后&quot;&gt;最后&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/october-start-recording/#%E6%9C%80%E5%90%8E&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;blockquote&gt;
&lt;p&gt;先写，再想写得好不好。&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;这是给自己定的唯一一条规矩。如果哪天翻回来发现写得幼稚，那说明我确实往前走了一点。&lt;/p&gt;&lt;p&gt;下一篇不知道什么时候。可能明天，可能下个月。&lt;/p&gt;&lt;/section&gt;</content:encoded></item><item><title>你好，世界</title><link>https://www.xfengling.me/posts/hello-world/</link><guid isPermaLink="true">https://www.xfengling.me/posts/hello-world/</guid><description>第一篇文章，占位内容，之后慢慢补充。</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;section class=&quot;markdown-section&quot;&gt;&lt;h2 id=&quot;你好世界&quot;&gt;你好，世界&lt;a class=&quot;anchor&quot; href=&quot;https://www.xfengling.me/posts/hello-world/#%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C&quot;&gt;&lt;span class=&quot;anchor-icon&quot; data-pagefind-ignore&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这是我的第一篇博客文章。&lt;/p&gt;&lt;p&gt;这里现在是一段占位内容：之后我会把想写的东西放在这里——学习笔记、生活片段，或者一些折腾的记录。&lt;/p&gt;&lt;blockquote&gt;
&lt;p&gt;博客刚搭好，慢慢来。&lt;/p&gt;
&lt;/blockquote&gt;&lt;/section&gt;</content:encoded></item></channel></rss>