<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>XFM</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://xfm0797.github.io/xfm-docs/</id>
  <link href="https://xfm0797.github.io/xfm-docs/" rel="alternate"/>
  <link href="https://xfm0797.github.io/xfm-docs/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, XFM</rights>
  <subtitle>hexo-theme-xfm · hexo-theme-xongyi</subtitle>
  <title>XFM开源官方文档</title>
  <updated>2026-10-11T16:09:52.631Z</updated>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="Tauri" scheme="https://xfm0797.github.io/xfm-docs/tags/Tauri/"/>
    <category term="React" scheme="https://xfm0797.github.io/xfm-docs/tags/React/"/>
    <category term="Rust" scheme="https://xfm0797.github.io/xfm-docs/tags/Rust/"/>
    <category term="桌面应用" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%A1%8C%E9%9D%A2%E5%BA%94%E7%94%A8/"/>
    <content>
      <![CDATA[<p><strong>HexoManager</strong> 是一款基于 Tauri 2.x + React 18 的跨平台桌面应用，用于集中管理本地多个 Hexo 站点，把 <code>hexo new</code> &#x2F; <code>hexo g</code> &#x2F; <code>hexo d</code> 这条命令行链路整体搬进图形界面。</p><span id="more"></span><h2 id="它解决什么问题" class="headline"><a href="#它解决什么问题" class="headerlink" title="它解决什么问题"></a>它解决什么问题</h2><p>传统 Hexo 工作流要在终端里反复敲命令，站点一多就得来回切换目录，还要手工维护各平台的 CI 配置文件。HexoManager 把这些操作收敛到一处：所有站点集中管理、文章可视化编辑、部署配置一键生成、构建发布全流程留痕。</p><h2 id="核心能力" class="headline"><a href="#核心能力" class="headerlink" title="核心能力"></a>核心能力</h2><ul><li><strong>站点管理</strong>：4 步创建向导、导入已有站点、卡片 &#x2F; 表格双视图、备份与复制</li><li><strong>文章编辑</strong>：Monaco 编辑器 + Markdown 实时预览、30 秒自动保存、Front Matter 模板一键套用</li><li><strong>配置管理</strong>：<code>_config.yml</code> 可视化表单与原始 YAML 双向编辑，带实时校验与差异对比</li><li><strong>部署配置</strong>：7 大平台 CI&#x2F;CD 文件一键生成（含边缘层回源策略），支持构建、提交、推送、部署自动化</li><li><strong>主题与插件</strong>：主题市场、12 个推荐插件、npm &#x2F; git 两种安装方式</li><li><strong>Git 与记录</strong>：改动暂存、提交回滚、部署历史表格与日志抽屉</li></ul><h2 id="技术栈" class="headline"><a href="#技术栈" class="headerlink" title="技术栈"></a>技术栈</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>层</th><th>选型</th></tr></thead><tbody><tr><td>前端</td><td>React 18.3 · TypeScript 5.7 · Vite 5 · Ant Design 5 · Tailwind CSS 3 · Zustand</td></tr><tr><td>后端</td><td>Tauri 2.x · Rust · rusqlite（WAL）· tokio · handlebars</td></tr><tr><td>编辑器</td><td>Monaco Editor</td></tr></tbody></table></div><p>数据全部保存在本机 SQLite 中，站点源码始终留在你指定的原始目录，应用不会复制或上传。</p><h2 id="快速开始" class="headline"><a href="#快速开始" class="headerlink" title="快速开始"></a>快速开始</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/xfm0797/HexoManager.git</span><br><span class="line"><span class="built_in">cd</span> HexoManager &amp;&amp; npm install</span><br><span class="line">npm run tauri dev      <span class="comment"># 开发模式</span></span><br><span class="line">npm run tauri build    <span class="comment"># 打包发布</span></span><br></pre></td></tr></table></figure><p>环境需 Node.js 18+、Rust 1.77+、Git 2.30+。</p><a class="xfm-link-card" href="https://github.com/xfm0797/HexoManager" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">HexoManager 源码仓库</span><span class="link-desc">桌面端 Hexo 多站点管理工具 · MIT</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexomanager/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexomanager/"/>
    <published>2026-10-11T14:40:00.000Z</published>
    <summary>基于 Tauri 2 + React 18 的跨平台桌面应用，把多个 Hexo 站点的写作、构建、部署收敛进一个图形界面。</summary>
    <title>HexoManager：桌面端 Hexo 多站点管理工具</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="前端" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%89%8D%E7%AB%AF/"/>
    <category term="EJS" scheme="https://xfm0797.github.io/xfm-docs/tags/EJS/"/>
    <content>
      <![CDATA[<p><strong>hexo-theme-xfm</strong> 是一套面向长期写作的 Hexo 主题：全套设计令牌驱动、深浅色对称、三模式切换，几乎所有形态都由配置决定，无需改动模板。</p><span id="more"></span><h2 id="三种形态，一套代码" class="headline"><a href="#三种形态，一套代码" class="headerlink" title="三种形态，一套代码"></a>三种形态，一套代码</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>模式</th><th>布局</th></tr></thead><tbody><tr><td><code>blog</code></td><td>卡片流 + 侧边挂件</td></tr><tr><td><code>notes</code></td><td>笔记树 + 沉浸阅读</td></tr><tr><td><code>docs</code></td><td>文档树 + 正文 + 目录三栏</td></tr></tbody></table></div><p>手机档自动转为单栏，笔记 &#x2F; 文档的左侧栏收起为抽屉，目录折叠为面板。</p><h2 id="核心亮点" class="headline"><a href="#核心亮点" class="headerlink" title="核心亮点"></a>核心亮点</h2><ul><li><strong>外观</strong>：深浅色三态（浅色 &#x2F; 深色 &#x2F; 跟随系统）、主色自定义、圆角档位、磨砂导航、背景光晕</li><li><strong>搜索</strong>：内置全文检索索引，Cmd &#x2F; Ctrl + K 唤起，支持键盘导航与关键词高亮</li><li><strong>代码块</strong>：语言标签、Mac 三色点、复制按钮、长代码折叠、行号与自研配色</li><li><strong>标签插件</strong>：提示块、折叠、选项卡、时间轴、栅格、按钮、徽标、图标、流程图、链接卡片</li><li><strong>内容增强</strong>：标题锚点、外链新窗、图片懒加载与灯箱、数学公式、Mermaid</li><li><strong>评论</strong>：giscus &#x2F; utterances &#x2F; waline &#x2F; twikoo &#x2F; disqus &#x2F; valine 等八种任选</li><li><strong>SEO</strong>：OG &#x2F; Twitter Card、canonical、JSON-LD、内置 sitemap.xml 与 robots.txt</li></ul><h2 id="安装" class="headline"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm i hexo-theme-xfm</span><br><span class="line"><span class="comment"># 或跟随仓库最新提交</span></span><br><span class="line">git <span class="built_in">clone</span> https://github.com/xfm0797/hexo-theme-xfm.git themes/xfm</span><br></pre></td></tr></table></figure><p>本站即以该主题的 <code>docs</code> 模式驱动。</p><a class="xfm-link-card" href="https://github.com/xfm0797/hexo-theme-xfm" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">hexo-theme-xfm 源码仓库</span><span class="link-desc">高端大气的 Hexo 三模式主题 · MIT</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xfm/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xfm/"/>
    <published>2026-10-11T14:30:00.000Z</published>
    <summary>高端大气的 Hexo 主题，一套代码切换 blog / notes / docs 三种形态，全站由设计令牌与配置驱动。</summary>
    <title>hexo-theme-xfm：覆盖博客 / 笔记 / 文档的三模式主题</title>
    <updated>2026-10-11T16:09:52.630Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="官网" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%AE%98%E7%BD%91/"/>
    <category term="响应式" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%93%8D%E5%BA%94%E5%BC%8F/"/>
    <content>
      <![CDATA[<p><strong>Xongyi</strong> 是一款面向机构官网场景的 Hexo 通用主题，内置<strong>企业 &#x2F; 政务 &#x2F; 教育</strong>三套预设布局与 12 个可自由排序的首页板块，60+ 项配置全部集中在 <code>_config.yml</code>，无需修改代码即可完成整站搭建。</p><span id="more"></span><h2 id="三套预设" class="headline"><a href="#三套预设" class="headerlink" title="三套预设"></a>三套预设</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>预设</th><th>配色</th><th>适用</th></tr></thead><tbody><tr><td><code>enterprise</code></td><td>商务蓝</td><td>企业官网</td></tr><tr><td><code>government</code></td><td>政务红</td><td>政务门户</td></tr><tr><td><code>education</code></td><td>学院青</td><td>学校 &#x2F; 教育机构</td></tr></tbody></table></div><p>一行配置即可切换。</p><h2 id="12-个首页板块" class="headline"><a href="#12-个首页板块" class="headerlink" title="12 个首页板块"></a>12 个首页板块</h2><p>横幅、快捷入口、数据统计、核心业务、关于我们、产品案例、新闻动态、团队、合作伙伴、风采图库、行动条、联系我们 —— 支持启用 &#x2F; 关闭 &#x2F; 自由排序，另有「关于我们 + 联系我们」左右合排版。</p><h2 id="其他特性" class="headline"><a href="#其他特性" class="headerlink" title="其他特性"></a>其他特性</h2><ul><li><strong>零框架依赖</strong>：原生 JS + 单 CSS 文件，Lighthouse 表现优异</li><li><strong>暗色模式</strong>：跟随系统的明暗切换，三套预设各自适配</li><li><strong>完全响应式</strong>：桌面 &#x2F; 平板 &#x2F; 手机抽屉菜单</li><li><strong>SEO 友好</strong>：OG &#x2F; Twitter Card &#x2F; JSON-LD、canonical 全覆盖</li><li><strong>新闻系统</strong>：文章即动态，自动生成新闻列表、归档、分类、标签页</li><li><strong>无障碍</strong>：跳转链接、aria 标签、<code>prefers-reduced-motion</code> 支持</li></ul><h2 id="安装" class="headline"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/xfm0797/hexo-theme-xongyi.git themes/xongyi</span><br></pre></td></tr></table></figure><p>也支持下载解压与 git submodule 两种引入方式，配合<a href="/2026/10/11/opensource-hexo-theme-xongyi-demo/">官方演示站</a>可一键部署到五大平台。</p><a class="xfm-link-card" href="https://github.com/xfm0797/hexo-theme-xongyi" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">hexo-theme-xongyi 源码仓库</span><span class="link-desc">机构官网通用 Hexo 主题 · MIT</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xongyi/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xongyi/"/>
    <published>2026-10-11T14:20:00.000Z</published>
    <summary>内置企业 / 政务 / 教育三套预设布局与 12 个可自由排序首页板块的机构官网主题，60+ 项配置全部集中在 _config.yml。</summary>
    <title>hexo-theme-xongyi：面向机构官网的三预设 Hexo 主题</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="中文排版" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%AD%E6%96%87%E6%8E%92%E7%89%88/"/>
    <category term="博客" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%8D%9A%E5%AE%A2/"/>
    <content>
      <![CDATA[<p><strong>墨痕（lovou）</strong> 是一款极简现代风、专为中文博客设计的 Hexo 主题。它把重点放在中文排版与阅读体验上，同时保持零外部 JS 依赖、零追踪脚本。</p><span id="more"></span><h2 id="设计与排版" class="headline"><a href="#设计与排版" class="headerlink" title="设计与排版"></a>设计与排版</h2><ul><li>极简现代设计，中文排版优化（系统字体栈、1.9 行高）</li><li>明 &#x2F; 暗双主题：默认跟随系统，可手动切换并记忆，无闪烁</li><li>响应式布局，支持 <code>prefers-reduced-motion</code></li><li>服务端代码高亮，内置明暗两套配色</li></ul><h2 id="功能" class="headline"><a href="#功能" class="headerlink" title="功能"></a>功能</h2><ul><li>宽屏文章页右侧悬浮目录，sticky 跟随滚动、可折叠</li><li>字数统计与阅读时长（中英混合计数）</li><li>归档按年分组、分类页、标签云、上下篇导航、分页</li><li>卡片式友链页：构建时自动抓取友链站点的 OG 信息</li><li>文末分享：微信二维码 &#x2F; 微博 &#x2F; X &#x2F; Telegram &#x2F; 复制链接</li><li>评论区：Giscus &#x2F; Waline &#x2F; Gitalk &#x2F; Disqus 四选一</li><li><strong>Sveltia CMS</strong>：浏览器中写文章、传图片，保存即自动发布</li></ul><h2 id="快速开始" class="headline"><a href="#快速开始" class="headerlink" title="快速开始"></a>快速开始</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install</span><br><span class="line">npm run server   <span class="comment"># 本地预览 http://localhost:4000</span></span><br><span class="line">npm run build    <span class="comment"># 生成到 public/</span></span><br></pre></td></tr></table></figure><p>同一份代码可同时部署到 EdgeOne Pages、Cloudflare Pages 与 GitHub Pages，路径由工作流自动适配。</p><a class="xfm-link-card" href="https://github.com/xfm0797/hexo-theme-lovou" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">hexo-theme-lovou 源码仓库</span><span class="link-desc">极简现代中文博客主题 · 演示站已上线</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-lovou/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-lovou/"/>
    <published>2026-10-11T14:10:00.000Z</published>
    <summary>极简现代风、专为中文博客设计的 Hexo 主题，零外部 JS 依赖、零追踪脚本，内置悬浮目录与 Sveltia CMS。</summary>
    <title>hexo-theme-lovou 墨痕：极简现代中文博客主题</title>
    <updated>2026-10-11T16:09:52.630Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="文档" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%96%87%E6%A1%A3/"/>
    <category term="交互" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%BA%A4%E4%BA%92/"/>
    <content>
      <![CDATA[<p>两项收尾工作：让<strong>文档侧栏的分组默认收起、点击再展开</strong>，并把 <strong>xongyi 文档重写</strong>成与 xfm 一致的分组结构。</p><span id="more"></span><h2 id="一、文档树：默认收起-点击展开" class="headline"><a href="#一、文档树：默认收起-点击展开" class="headerlink" title="一、文档树：默认收起 + 点击展开"></a>一、文档树：默认收起 + 点击展开</h2><h3 id="根因（主题的三个缺口）" class="headline"><a href="#根因（主题的三个缺口）" class="headerlink" title="根因（主题的三个缺口）"></a>根因（主题的三个缺口）</h3><p>主题对 docs 侧栏只输出 <code>.xfm-nav-item.has-children</code> + <code>.xfm-nav-toggle</code> + 空 <code>&lt;i class=&quot;xfm-arrow&quot;&gt;</code>，但：</p><ol><li>CSS 只实现了 <code>.xfm-nav-group</code>（<strong>笔记</strong>侧栏）的折叠，<code>.xfm-sidebar-nav</code> 下<strong>没有任何收起规则</strong> → 整棵树永远全展开；</li><li><code>core.js</code> 只给 <code>.xfm-nav-group-head</code> 绑了点击，<code>.xfm-nav-toggle</code> <strong>无任何事件</strong> → 点箭头毫无反应；</li><li><code>.xfm-arrow</code> <strong>全主题没有样式</strong> → 连箭头都看不见。</li></ol><h3 id="站点层修复" class="headline"><a href="#站点层修复" class="headerlink" title="站点层修复"></a>站点层修复</h3><div class="table-wrap" tabindex="0"><table><thead><tr><th>新增文件</th><th>职责</th></tr></thead><tbody><tr><td><code>source/css/xfm-docs-tree.css</code></td><td>两列栅格让子列表独占一行；核心规则 <code>.has-children:not(.is-open) &gt; .xfm-nav-list &#123; display: none &#125;</code>；用 border 画 chevron 并随展开态旋转</td></tr><tr><td><code>source/js/xfm-docs-tree.js</code></td><td>document 级事件委托：点整行标签或箭头切换 <code>.is-open</code> 并同步 <code>aria-expanded</code>；支持 Enter &#x2F; Space</td></tr></tbody></table></div><p>两者经 <code>theme_config.custom.css / custom.js</code> 引入。</p><div class="xfm-note note-success"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-check"></use></svg></span><div class="note-main"><div class="note-title">设计要点：通用规则，后续新增文档自动生效</div><div class="note-body"><p>默认只展开<strong>当前页所在的那条路径</strong>（主题早已给各级祖先写了 <code>.is-open</code>），其余分组一律收起。收起态是<strong>纯 CSS</strong>，因此即使 JS 未加载也<strong>不会闪开</strong>。规则全部基于 <code>.has-children</code>，<strong>后续新增任何分组都自动生效</strong>，无需逐页配置。</p></div></div></div></div><h2 id="二、xongyi-文档按-xfm-结构重写（8-篇-→-21-篇）" class="headline"><a href="#二、xongyi-文档按-xfm-结构重写（8-篇-→-21-篇）" class="headerlink" title="二、xongyi 文档按 xfm 结构重写（8 篇 → 21 篇）"></a>二、xongyi 文档按 xfm 结构重写（8 篇 → 21 篇）</h2><p>原先 xongyi 只有 8 篇扁平文档。这次重写为与 xfm 同构的分组树：</p><div class="table-wrap" tabindex="0"><table><thead><tr><th>分组</th><th>页面</th></tr></thead><tbody><tr><td>文档首页</td><td><code>/docs/xongyi/</code></td></tr><tr><td>快速开始</td><td>主题简介 &#x2F; 安装与部署 &#x2F; 5 分钟上手</td></tr><tr><td>预设布局</td><td>三套预设 &#x2F; 预设示例</td></tr><tr><td>首页板块</td><td>板块总览 &#x2F; 板块配置详解</td></tr><tr><td>配置参考</td><td>配置总览 &#x2F; 品牌与导航 &#x2F; 联系与地图 &#x2F; 页脚与备案 &#x2F; 功能与统计</td></tr><tr><td>内容与新闻</td><td>写新闻与内容 &#x2F; 页面与 Front-matter</td></tr><tr><td>定制与进阶</td><td>图标速查 &#x2F; 自定义样式与模板 &#x2F; 目录结构与运行时</td></tr><tr><td>部署</td><td>一键部署</td></tr><tr><td>帮助</td><td>常见问题 &#x2F; 故障排查</td></tr></tbody></table></div><p>内容取自主题权威源：<code>README.md</code>、<code>_config.yml</code>、<code>examples/config.*.yml</code>、<code>scripts/icons.js</code>（<strong>52 个图标</strong>）、<code>languages/</code>、<code>layout/</code> 与 <code>style.css</code> 的 CSS 令牌。front-matter 与 xfm 对齐，<code>_data/docs.yml</code> 的 xongyi 分组改为同构三级树。</p><h2 id="校验" class="headline"><a href="#校验" class="headerlink" title="校验"></a>校验</h2><ul><li>构建 <strong>91 files，0 error</strong>；文档页未渲染的标签残留 0。</li><li>侧栏 <strong>49 条链接全部命中</strong>，50 个文档页无孤儿，70 个 HTML 中 <code>/docs/</code> 链接 0 失效。</li><li><strong>jsdom 模拟点击</strong>：收起分组 <code>aria-expanded=false</code> → 点标签展开 → 点箭头收起 → <code>preventDefault</code> 正确；叶子链接不被拦截。</li></ul><div class="xfm-note note-tip"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-bulb"></use></svg></span><div class="note-main"><div class="note-title">若想让当前分支也收起</div><div class="note-body"><p>现在默认会展开当前页所在分支（便于定位）。若希望连当前分支也默认收起，把 CSS 里的 <code>:not(.is-open)</code> 改为对全部 <code>.has-children</code> 生效即可。</p></div></div></div></div>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/docs-tree-and-xongyi/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/docs-tree-and-xongyi/"/>
    <published>2026-10-11T14:00:00.000Z</published>
    <summary>文档侧栏分组改为默认收起、点击展开（对后续新增文档同样生效），并把 xongyi 文档由 8 篇扁平重写为与 xfm 同构的 21 篇分组文档。</summary>
    <title>文档树默认收起点击展开，xongyi 文档按 xfm 结构重写</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="文档站" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%96%87%E6%A1%A3%E7%AB%99/"/>
    <category term="开源" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%BC%80%E6%BA%90/"/>
    <content>
      <![CDATA[<p><strong>xfm-docs</strong> 是 XFM 两套开源 Hexo 主题的官方文档站，收录 <code>hexo-theme-xfm</code> 与 <code>hexo-theme-xongyi</code> 的完整技术文档，共 <strong>49 篇</strong>。</p><span id="more"></span><h2 id="站点构成" class="headline"><a href="#站点构成" class="headerlink" title="站点构成"></a>站点构成</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>主题</th><th>定位</th><th>文档</th></tr></thead><tbody><tr><td>hexo-theme-xfm</td><td>三模式主题（博客 &#x2F; 笔记 &#x2F; 文档）</td><td>27 篇</td></tr><tr><td>hexo-theme-xongyi</td><td>机构官网通用主题（企业 &#x2F; 政务 &#x2F; 教育）</td><td>21 篇</td></tr></tbody></table></div><p>整站由 <strong>hexo-theme-xfm 的 docs 模式</strong>驱动，使用 Hexo 8 构建；主题通过 <strong>git submodule</strong> 引用官方仓库 <code>themes/xfm</code>，仓库内不存放主题源码。</p><h2 id="文档侧栏树" class="headline"><a href="#文档侧栏树" class="headerlink" title="文档侧栏树"></a>文档侧栏树</h2><p>侧栏树由 <code>source/_data/docs.yml</code> 定义，按主题分区、可递归到三级，并支持点击展开 &#x2F; 收起、默认折叠：</p><figure class="highlight yaml code-block" data-lang="yaml"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">YAML</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="bullet">-</span> <span class="attr">title:</span> <span class="string">hexo-theme-xfm</span></span><br><span class="line">  <span class="attr">children:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">title:</span> <span class="string">快速开始</span></span><br><span class="line">      <span class="attr">children:</span></span><br><span class="line">        <span class="bullet">-</span> <span class="attr">title:</span> <span class="string">主题简介</span></span><br><span class="line">          <span class="attr">path:</span> <span class="string">docs/xfm/intro</span></span><br></pre></td></tr></table></figure><p>文档页统一采用「目录 + index.md」的组织方式，以产出 pretty URL。</p><h2 id="站点级补丁" class="headline"><a href="#站点级补丁" class="headerlink" title="站点级补丁"></a>站点级补丁</h2><p>主题以 submodule 引入，所有定制都通过站点层实现，主题升级不冲突：</p><ul><li><code>source/css/xfm-docs-tree.css</code> + <code>source/js/xfm-docs-tree.js</code>：文档树分组折叠</li><li><code>source/js/xfm-tabs.js</code>：选项卡切换</li><li><code>scripts/pagination-view.js</code>：统一分页结构</li></ul><h2 id="本地构建" class="headline"><a href="#本地构建" class="headerlink" title="本地构建"></a>本地构建</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> --recursive https://github.com/xfm0797/xfm-docs.git</span><br><span class="line"><span class="built_in">cd</span> xfm-docs &amp;&amp; npm install</span><br><span class="line">hexo clean &amp;&amp; hexo generate</span><br></pre></td></tr></table></figure><a class="xfm-link-card" href="https://github.com/xfm0797/xfm-docs" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">xfm-docs 源码仓库</span><span class="link-desc">XFM 开源官方文档站 · Hexo 8</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm-docs/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm-docs/"/>
    <published>2026-10-11T14:00:00.000Z</published>
    <summary>收录 hexo-theme-xfm 与 hexo-theme-xongyi 两套主题官方技术文档的站点，由主题 docs 模式驱动、Hexo 8 构建。</summary>
    <title>xfm-docs：XFM 开源官方文档站</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="演示站" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%BC%94%E7%A4%BA%E7%AB%99/"/>
    <category term="部署" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%83%A8%E7%BD%B2/"/>
    <content>
      <![CDATA[<p><strong>hexo-theme-xongyi-demo</strong> 是 <a href="/2026/10/11/opensource-hexo-theme-xongyi/">hexo-theme-xongyi</a> 主题的官方演示站：一个开箱即用的完整 Hexo 站点，含首页全部板块、关于 &#x2F; 产品 &#x2F; 新闻 &#x2F; 联系页面与 4 篇示例文章。</p><span id="more"></span><h2 id="你要主题还是要整站" class="headline"><a href="#你要主题还是要整站" class="headerlink" title="你要主题还是要整站"></a>你要主题还是要整站</h2><ul><li>只想把主题装进自己的 Hexo 站点 → 前往<a href="/2026/10/11/opensource-hexo-theme-xongyi/">主题仓库</a></li><li>想要「主题 + 站点」的完整用法参考 → 直接用本仓库</li></ul><h2 id="一键部署" class="headline"><a href="#一键部署" class="headerlink" title="一键部署"></a>一键部署</h2><p>仓库内已内置全部构建配置，Fork 或导入后选择任一平台即可部署：</p><div class="table-wrap" tabindex="0"><table><thead><tr><th>平台</th><th>方式</th></tr></thead><tbody><tr><td>Netlify</td><td>Deploy 按钮一键拉取</td></tr><tr><td>Vercel</td><td>同上</td></tr><tr><td>Cloudflare</td><td>同上（Pages &#x2F; Workers）</td></tr><tr><td>GitHub Pages</td><td>自带 <code>pages.yml</code>，push 到 <code>main</code> 自动发布</td></tr><tr><td>EdgeOne Pages</td><td>根目录 <code>edgeone.json</code> 已配置构建参数</td></tr></tbody></table></div><blockquote><p>主题以 git submodule 引入，部署时需启用 <strong>Recursive &#x2F; Submodules</strong> 克隆选项。</p></blockquote><h2 id="免配置的地址处理" class="headline"><a href="#免配置的地址处理" class="headerlink" title="免配置的地址处理"></a>免配置的地址处理</h2><p><code>_config.yml</code> 里的 <code>url</code> &#x2F; <code>root</code> 是占位值，<strong>无需手工修改</strong>：GitHub Pages 工作流会在构建前读取真实地址并生成覆盖配置，Fork 到自己账号或绑定自定义域名都能自动生效。</p><a class="xfm-link-card" href="https://github.com/xfm0797/hexo-theme-xongyi-demo" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">hexo-theme-xongyi-demo 源码仓库</span><span class="link-desc">主题官方演示站 · 五平台一键部署</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xongyi-demo/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-hexo-theme-xongyi-demo/"/>
    <published>2026-10-11T13:50:00.000Z</published>
    <summary>hexo-theme-xongyi 的官方演示站，一个开箱即用的完整 Hexo 站点，内置五大平台一键部署配置。</summary>
    <title>hexo-theme-xongyi-demo：主题官方演示站</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="PHP" scheme="https://xfm0797.github.io/xfm-docs/tags/PHP/"/>
    <category term="CMS" scheme="https://xfm0797.github.io/xfm-docs/tags/CMS/"/>
    <category term="SQLite" scheme="https://xfm0797.github.io/xfm-docs/tags/SQLite/"/>
    <category term="静态化" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%9D%99%E6%80%81%E5%8C%96/"/>
    <content>
      <![CDATA[<p><strong>X-admin</strong> 是一套开源、免费、可自由修改分发的轻量级 CMS，核心设计理念是<strong>动静分离</strong>：后台使用 PHP 动态管理内容，前端由 Nginx &#x2F; Apache 直接输出静态 HTML，完全不经过 PHP。</p><span id="more"></span><h2 id="设计取舍" class="headline"><a href="#设计取舍" class="headerlink" title="设计取舍"></a>设计取舍</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>维度</th><th>做法</th></tr></thead><tbody><tr><td>数据</td><td>单文件 SQLite 数据库，零配置，上传即用</td></tr><tr><td>前端</td><td>纯静态 HTML 直出，访问不经过 PHP</td></tr><tr><td>模板</td><td>原生 PHP 模板引擎，支持多主题切换</td></tr><tr><td>扩展</td><td>钩子系统，支持插件化功能扩展</td></tr><tr><td>生成</td><td>智能增量：发布 &#x2F; 更新 &#x2F; 删除时只重建受影响的页面</td></tr><tr><td>搜索</td><td>前端 JS 加载索引文件做全文检索，无需 PHP</td></tr></tbody></table></div><h2 id="产物结构" class="headline"><a href="#产物结构" class="headerlink" title="产物结构"></a>产物结构</h2><p>静态文件按语义分目录输出：<code>index.html</code>、<code>article/&#123;slug&#125;.html</code>、<code>category/&#123;slug&#125;.html</code>、<code>tag/&#123;slug&#125;.html</code>、<code>page/&#123;slug&#125;.html</code>，另有 <code>search-index.json</code>、<code>rss.xml</code>、<code>sitemap.xml</code>、<code>robots.txt</code>。</p><p>后台与数据库收在 <code>x-admin/</code> 子目录，与静态产物完全隔离。</p><h2 id="部署" class="headline"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><ul><li><strong>Apache &#x2F; Nginx</strong>：站点根指向项目根，静态直出；代码目录单独做访问限制</li><li><strong>最简部署</strong>：无需 Rewrite 规则也能跑</li><li><strong>GitHub Pages</strong>：附带 <code>deploy.yml</code>，用 CLI 构建脚本产出 <code>dist/</code> 后自动发布</li></ul><a class="xfm-link-card" href="https://github.com/xfm0797/X-admin" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">X-admin 源码仓库</span><span class="link-desc">动静分离轻量级 PHP CMS · MIT</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-admin/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-admin/"/>
    <published>2026-10-11T13:40:00.000Z</published>
    <summary>后台 PHP 动态管理内容，前端由 Nginx/Apache 直接输出静态 HTML 的轻量级内容管理系统，单文件数据库零配置。</summary>
    <title>X-admin：动静分离的轻量级 PHP CMS</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="官网" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%AE%98%E7%BD%91/"/>
    <category term="PHP" scheme="https://xfm0797.github.io/xfm-docs/tags/PHP/"/>
    <category term="CMS" scheme="https://xfm0797.github.io/xfm-docs/tags/CMS/"/>
    <category term="SQLite" scheme="https://xfm0797.github.io/xfm-docs/tags/SQLite/"/>
    <category term="MySQL" scheme="https://xfm0797.github.io/xfm-docs/tags/MySQL/"/>
    <content>
      <![CDATA[<p><strong>XFM CMS</strong> 是一套基于 PHP 7.4 + SQLite &#x2F; MySQL 的轻量级企业官网程序，专为产品展示型小微企业设计。零外部依赖，默认使用 SQLite 单文件数据库，也可切换到 MySQL &#x2F; MariaDB 应对更高并发。</p><span id="more"></span><h2 id="前台能力" class="headline"><a href="#前台能力" class="headerlink" title="前台能力"></a>前台能力</h2><ul><li><strong>首页</strong>：轮播横幅 + 公司新闻 + 产品中心（左栏分类 &#x2F; 右栏四列卡片）+ 关于 &#x2F; 联系并排</li><li><strong>轮播横幅</strong>：背景图或渐变色、自动播放、左右箭头、指示点、触摸滑动、键盘方向键</li><li><strong>公司新闻</strong>：列表分页、详情页（封面图、摘要引言、Markdown 正文、相关新闻、浏览统计）</li><li><strong>产品中心</strong>：分类导航 + 卡片网格、关键词搜索、详情页多图画廊与规格参数表</li><li><strong>联系我们</strong>：留言表单（带验证、防灌水、AJAX 提交）</li><li><strong>SEO 与体验</strong>：伪静态 URL 可开关、自动生成 sitemap.xml、全响应式、资源压缩与 Gzip</li></ul><h2 id="后台能力" class="headline"><a href="#后台能力" class="headerlink" title="后台能力"></a>后台能力</h2><p>独立登录入口（<code>password_hash</code> 加密）、仪表盘统计、横幅 &#x2F; 新闻 &#x2F; 产品 &#x2F; 分类 &#x2F; 留言的增删改查、多图上传、推荐与排序、发布状态控制。</p><h2 id="部署" class="headline"><a href="#部署" class="headerlink" title="部署"></a>部署</h2><p><strong>方法一（推荐）</strong>：把源码上传到虚拟主机即可，默认识别 SQLite，无需配置数据库。<br><strong>方法二</strong>：本地用 PHP 内置服务器预览。</p><p>README 中还附有免费虚拟主机部署指南与数据库保护建议。</p><a class="xfm-link-card" href="https://github.com/xfm0797/xfm-cms" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">XFM CMS 源码仓库</span><span class="link-desc">小微企业产品展示型官网程序 · PHP 7.4</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm-cms/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm-cms/"/>
    <published>2026-10-11T13:30:00.000Z</published>
    <summary>基于 PHP 7.4 + SQLite/MySQL 的产品展示型企业官网程序，零外部依赖，可跑在绝大多数免费虚拟主机上。</summary>
    <title>XFM CMS：小微企业产品展示型官网程序</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Tauri" scheme="https://xfm0797.github.io/xfm-docs/tags/Tauri/"/>
    <category term="Rust" scheme="https://xfm0797.github.io/xfm-docs/tags/Rust/"/>
    <category term="Vue" scheme="https://xfm0797.github.io/xfm-docs/tags/Vue/"/>
    <category term="桌面应用" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%A1%8C%E9%9D%A2%E5%BA%94%E7%94%A8/"/>
    <category term="静态站点" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%9D%99%E6%80%81%E7%AB%99%E7%82%B9/"/>
    <content>
      <![CDATA[<p><strong>x-site</strong> 是一款类 Gridea 的跨平台静态博客桌面客户端，基于 <strong>Tauri v2 + Vue 3 + TypeScript + Rust</strong> 构建。安装包小于 15MB，启动快、内存占用低，支持 Windows &#x2F; macOS &#x2F; Linux。</p><span id="more"></span><h2 id="内容管理" class="headline"><a href="#内容管理" class="headerlink" title="内容管理"></a>内容管理</h2><ul><li>文章增删改查，草稿与已发布双状态</li><li>CodeMirror 6 编辑器 + markdown-it 实时预览 + highlight.js 高亮</li><li>编辑停顿 1 秒防抖写入 SQLite，状态栏显示保存状态</li><li>从系统拖入图片自动复制到资源目录并插入相对路径</li><li>元数据面板：标题、Slug、分类、标签、封面、发布状态</li></ul><h2 id="站点生成（纯-Rust-实现）" class="headline"><a href="#站点生成（纯-Rust-实现）" class="headerlink" title="站点生成（纯 Rust 实现）"></a>站点生成（纯 Rust 实现）</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>环节</th><th>选型</th></tr></thead><tbody><tr><td>模板</td><td>Tera（支持继承、变量、过滤器）</td></tr><tr><td>Markdown</td><td>pulldown-cmark（表格 &#x2F; 脚注 &#x2F; 任务列表）</td></tr><tr><td>高亮</td><td>syntect，内嵌 base16-ocean.dark</td></tr><tr><td>并发</td><td>rayon 多文章并行渲染，进度经 Tauri 事件推送</td></tr></tbody></table></div><p>产物覆盖首页分页、文章页、归档页、标签页、分类页、友链页，以及 <code>sitemap.xml</code> &#x2F; <code>feed.xml</code> &#x2F; <code>robots.txt</code>。</p><h2 id="主题与部署" class="headline"><a href="#主题与部署" class="headerlink" title="主题与部署"></a>主题与部署</h2><p>主题为约定式目录结构（<code>theme.json</code> + 若干 <code>.tera</code> + <code>assets/</code>），支持一键激活与 <strong>ZIP 导入</strong>。部署支持 <strong>Local Copy</strong> 与 <strong>Git Push</strong>（可指定分支推送到 GitHub Pages 或任意仓库），本地预览由 Rust 端 <code>axum</code> 提供静态服务。应用内置自动更新（签名校验 + CI 发布）。</p><a class="xfm-link-card" href="https://github.com/xfm0797/x-site" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">x-site 源码仓库</span><span class="link-desc">跨平台静态博客桌面客户端 · v0.1.0</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-site/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-site/"/>
    <published>2026-10-11T13:20:00.000Z</published>
    <summary>基于 Tauri v2 + Vue 3 + Rust 的类 Gridea 静态博客客户端，安装包小于 15MB，内置编辑器、站点生成、主题与一键部署。</summary>
    <title>x-site：跨平台静态博客桌面客户端</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Tauri" scheme="https://xfm0797.github.io/xfm-docs/tags/Tauri/"/>
    <category term="React" scheme="https://xfm0797.github.io/xfm-docs/tags/React/"/>
    <category term="Rust" scheme="https://xfm0797.github.io/xfm-docs/tags/Rust/"/>
    <category term="采集" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%87%87%E9%9B%86/"/>
    <category term="内容工具" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%86%85%E5%AE%B9%E5%B7%A5%E5%85%B7/"/>
    <content>
      <![CDATA[<p><strong>枫铃采集器（x-collector）</strong> 是一款基于 Tauri 2 + React 18 + Rust + SQLite 的桌面采集与发布工具，把「采集 → 清洗 → 伪原创 → 发布」串成一条流水线。</p><span id="more"></span><h2 id="流水线能力" class="headline"><a href="#流水线能力" class="headerlink" title="流水线能力"></a>流水线能力</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>阶段</th><th>能力</th></tr></thead><tbody><tr><td>采集</td><td>百度 &#x2F; Google &#x2F; Bing &#x2F; 搜狗关键词采集；RSS、单页、sitemap 批量发现；自定义 CSS 选择器</td></tr><tr><td>清洗</td><td>广告 &#x2F; 导航 &#x2F; 侧边栏移除、链接绝对化、GBK 编码识别、HTML → Markdown</td></tr><tr><td>伪原创</td><td>同义词替换（120+ 词库）、句子改写、段落重排、首尾段重写、自定义词库</td></tr><tr><td>反爬</td><td>UA 轮换、完整浏览器请求头、Cookie 携带、随机延迟、指数退避</td></tr><tr><td>去重</td><td>URL 哈希 + 标题相似度（编辑距离 ≥ 85%）+ 内容指纹</td></tr><tr><td>发布</td><td>Hexo 导出、WordPress &#x2F; Typecho &#x2F; Z-Blog XML-RPC 自动发布，发布记录追踪</td></tr></tbody></table></div><h2 id="上手三步" class="headline"><a href="#上手三步" class="headerlink" title="上手三步"></a>上手三步</h2><ol><li>「关键词采集」→ 添加关键词 → 点击采集</li><li>「文章库」查看 &#x2F; 编辑采集结果</li><li>「发布管理」→ 选择文章 → 发布到 Hexo 或 CMS</li></ol><h2 id="技术栈" class="headline"><a href="#技术栈" class="headerlink" title="技术栈"></a>技术栈</h2><ul><li><strong>前端</strong>：React 18 · TypeScript · Ant Design 5 · Tailwind CSS 3 · Zustand 4</li><li><strong>后端</strong>：Rust · Tauri 2 · SQLite（rusqlite）· reqwest · scraper · rust-embed</li></ul><p>应用内置帮助中心：8 章用户手册、6 套配置示例与错误码速查，随二进制离线可用。</p><h2 id="运行" class="headline"><a href="#运行" class="headerlink" title="运行"></a>运行</h2><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install</span><br><span class="line">npm run tauri dev     <span class="comment"># 开发模式</span></span><br><span class="line">npm run tauri build   <span class="comment"># 打包</span></span><br></pre></td></tr></table></figure><p>需 Node.js ≥ 18、Rust ≥ 1.80。</p><a class="xfm-link-card" href="https://github.com/xfm0797/x-collector" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">x-collector 源码仓库</span><span class="link-desc">关键词采集 · 内容清洗 · 伪原创 · 多平台发布</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-collector/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-x-collector/"/>
    <published>2026-10-11T13:10:00.000Z</published>
    <summary>基于 Tauri 2 + React 18 + Rust + SQLite 的桌面采集与发布工具，覆盖采集、清洗、伪原创到 Hexo / CMS 发布的全链路。</summary>
    <title>枫铃采集器 x-collector：关键词采集与多平台发布</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="部署" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%83%A8%E7%BD%B2/"/>
    <category term="站点案例" scheme="https://xfm0797.github.io/xfm-docs/tags/%E7%AB%99%E7%82%B9%E6%A1%88%E4%BE%8B/"/>
    <category term="企业官网" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%BC%81%E4%B8%9A%E5%AE%98%E7%BD%91/"/>
    <content>
      <![CDATA[<p><strong>xongyi</strong> 仓库是一份公开的 Hexo 站点源码，也是 <a href="/2026/10/11/opensource-hexo-theme-xongyi/">hexo-theme-xongyi</a> 主题的<strong>真实落地案例</strong> —— 佛山市顺德区雄亿检测仪器有限公司官网。</p><span id="more"></span><h2 id="站点信息" class="headline"><a href="#站点信息" class="headerlink" title="站点信息"></a>站点信息</h2><div class="table-wrap" tabindex="0"><table><thead><tr><th>项</th><th>内容</th></tr></thead><tbody><tr><td>站点名</td><td>雄亿仪器网</td></tr><tr><td>定位</td><td>检测仪器 · 实验设备专业供应商</td></tr><tr><td>主题</td><td>hexo-theme-xongyi</td></tr><tr><td>框架</td><td>Hexo 8.1.2</td></tr><tr><td>地址</td><td><a href="https://www.xongyi.com/" target="_blank" rel="noopener noreferrer nofollow" class="ext-link">https://www.xongyi.com</a></td></tr></tbody></table></div><p>站点内容覆盖涂料检测仪器、橡胶检测仪器、实验室通用分析仪器、光学仪器、进口仪器与实验耗材等产品线。</p><h2 id="目录结构" class="headline"><a href="#目录结构" class="headerlink" title="目录结构"></a>目录结构</h2><figure class="highlight plaintext code-block" data-lang="plaintext"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Text</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">xongyi/</span><br><span class="line">├── _config.yml        # 站点配置（品牌、SEO、关键词）</span><br><span class="line">├── source/</span><br><span class="line">│   ├── _posts/        # 新闻 / 动态</span><br><span class="line">│   ├── about-us/      # 关于我们</span><br><span class="line">│   ├── contact/       # 联系我们</span><br><span class="line">│   ├── categories/    # 分类页</span><br><span class="line">│   ├── search/        # 站内搜索</span><br><span class="line">│   └── images/        # 站点图片资源</span><br><span class="line">├── scripts/           # 站点级扩展脚本</span><br><span class="line">├── tools/             # 辅助工具</span><br><span class="line">└── themes/xongyi/     # 主题</span><br></pre></td></tr></table></figure><p>它把主题的 12 个首页板块与三套预设真实用在了生产环境，可作为「主题如何支撑一个完整机构官网」的参考。</p><a class="xfm-link-card" href="https://github.com/xfm0797/xongyi" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">xongyi 站点源码</span><span class="link-desc">雄亿仪器网 · hexo-theme-xongyi 落地案例</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xongyi/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xongyi/"/>
    <published>2026-10-11T13:00:00.000Z</published>
    <summary>用 hexo-theme-xongyi 搭建的真实企业官网案例源码 —— 佛山市顺德区雄亿检测仪器有限公司站点。</summary>
    <title>xongyi：雄亿仪器网 —— 主题的真实落地案例</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="开源项目" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="GitHub Pages" scheme="https://xfm0797.github.io/xfm-docs/tags/GitHub-Pages/"/>
    <category term="Cloudflare" scheme="https://xfm0797.github.io/xfm-docs/tags/Cloudflare/"/>
    <category term="教程" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%95%99%E7%A8%8B/"/>
    <content>
      <![CDATA[<p><strong>xfm0797.github.io</strong> 是我最早的 Hexo 站点，也是一份公开的建站学习笔记：记录 Hexo 从零搭建过程中遇到的问题、解决思路与优化方法。</p><span id="more"></span><h2 id="站点定位" class="headline"><a href="#站点定位" class="headerlink" title="站点定位"></a>站点定位</h2><ul><li>搭建在 GitHub Pages 的静态博客，源码即仓库，push 即发布</li><li>同步由 <strong>Cloudflare Pages</strong> 托管，保证任何网络环境下都能访问</li><li>内容以 Hexo 使用手册与踩坑记录为主</li></ul><h2 id="内容覆盖" class="headline"><a href="#内容覆盖" class="headerlink" title="内容覆盖"></a>内容覆盖</h2><p>从环境准备到部署上线，按步骤整理：</p><ol><li><strong>环境要求</strong>：Node.js（8.0+ 需 ≥ 20.19）、Git 的安装与版本对照表</li><li><strong>安装 Hexo</strong>：全局 <code>hexo-cli</code> 与局部依赖两种方式</li><li><strong>常用命令</strong>：<code>hexo clean</code> &#x2F; <code>generate</code> &#x2F; <code>server</code> 的用途与差异</li><li><strong>常见问题</strong>：EACCES 权限、Snap 安装、Node 版本限制等的处理办法</li></ol><h2 id="意义" class="headline"><a href="#意义" class="headerlink" title="意义"></a>意义</h2><p>这个站点是后续 <code>hexo-theme-xfm</code>、<code>hexo-theme-xongyi</code> 两套主题与 HexoManager、x-site 等工具的起点 —— 先在纯手写流程里踩坑，再把经验沉淀成工具。</p><a class="xfm-link-card" href="https://github.com/xfm0797/xfm0797.github.io" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">xfm0797.github.io 源码仓库</span><span class="link-desc">学习 Hexo 建站 · GitHub Pages</span><span class="link-host">github.com</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm0797-github-io/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/opensource-xfm0797-github-io/"/>
    <published>2026-10-11T12:50:00.000Z</published>
    <summary>搭建在 GitHub Pages 的 Hexo 学习笔记站，记录建站过程中遇到的问题、解决思路与优化方法，并由 Cloudflare Pages 双托管。</summary>
    <title>xfm0797.github.io：我的 Hexo 建站学习站</title>
    <updated>2026-10-11T16:09:52.631Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="文档" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%96%87%E6%A1%A3/"/>
    <category term="评论" scheme="https://xfm0797.github.io/xfm-docs/tags/%E8%AF%84%E8%AE%BA/"/>
    <category term="RSS" scheme="https://xfm0797.github.io/xfm-docs/tags/RSS/"/>
    <content>
      <![CDATA[<p>这一轮做了两件事：<strong>把 xfm 文档收进主题子目录</strong>，以及<strong>补齐站点的订阅、编辑、评论能力</strong>。</p><span id="more"></span><h2 id="一、文档迁入-docs-xfm" class="headline"><a href="#一、文档迁入-docs-xfm" class="headerlink" title="一、文档迁入 &#x2F;docs&#x2F;xfm&#x2F;"></a>一、文档迁入 &#x2F;docs&#x2F;xfm&#x2F;</h2><p>为了让「主题 → 页面」的层级在 URL 上也能体现：</p><ul><li><code>source/docs/</code> 下 <strong>27 篇</strong> xfm 文档全部迁入 <code>source/docs/xfm/</code>；</li><li>原 <code>/docs/</code> 落地页改为 <code>/docs/xfm/index.md</code>；</li><li><strong>新建 <code>/docs/index.md</code> 作为文档中心</strong>，分别链接到两个主题分区；</li><li>侧栏 <code>_data/docs.yml</code> 重构为<strong>两个顶层主题分组</strong>，共 36 条链接。</li></ul><p>文档内 <code>/docs/&lt;slug&gt;</code> → <code>/docs/xfm/&lt;slug&gt;</code> 全量改写（含代码示例与按钮标签的参数），但 <strong>FAQ 里「部署到子目录 <code>root: /docs/</code>」这类通用示例予以保留</strong>。</p><h2 id="二、修复选项卡「点击无响应」" class="headline"><a href="#二、修复选项卡「点击无响应」" class="headerlink" title="二、修复选项卡「点击无响应」"></a>二、修复选项卡「点击无响应」</h2><p>复现确认：主题 <code>core.js</code> <strong>完全没有</strong> <code>tabs</code> 标签的切换逻辑 —— 标签只产出 <code>.xfm-tab-btn</code> &#x2F; <code>.xfm-tab-panel</code> 的 DOM，CSS 也齐全，但没有 JS 去切换 <code>is-active</code>，所以点「git clone」等选项卡毫无反应。</p><p><strong>站点层修复</strong>（不改主题）：新增 <code>source/js/xfm-tabs.js</code>（事件委托切换 + 左右方向键），经 <code>theme_config.custom.js</code> 引入。用 jsdom 载入构建产物<strong>模拟真实点击</strong>验证通过。</p><h2 id="三、启用订阅（RSS）" class="headline"><a href="#三、启用订阅（RSS）" class="headerlink" title="三、启用订阅（RSS）"></a>三、启用订阅（RSS）</h2><p>安装 <code>hexo-generator-feed</code>（v4）并新增 <code>feed</code> 配置（<code>atom.xml</code>），同时开启 <code>vendors.rss_navbar</code>。结果：导航栏出现 RSS 图标，<code>&lt;head&gt;</code> 输出 <code>&lt;link rel=&quot;alternate&quot;&gt;</code>，产出 <code>/atom.xml</code>。</p><h2 id="四、启用编辑此页" class="headline"><a href="#四、启用编辑此页" class="headerlink" title="四、启用编辑此页"></a>四、启用编辑此页</h2><figure class="highlight yaml code-block" data-lang="yaml"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">YAML</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">docs:</span></span><br><span class="line">  <span class="attr">edit_link:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">edit_base:</span> <span class="string">https://github.com/xfm0797/xfm-docs/edit/main/source/</span></span><br></pre></td></tr></table></figure><p>最终地址 &#x3D; <code>edit_base</code> + 页面源文件路径，例如 <code>…/edit/main/source/docs/xfm/install/index.md</code>。</p><h2 id="五、启用-Waline-评论" class="headline"><a href="#五、启用-Waline-评论" class="headerlink" title="五、启用 Waline 评论"></a>五、启用 Waline 评论</h2><figure class="highlight yaml code-block" data-lang="yaml"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">YAML</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">comments:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">waline</span></span><br><span class="line">  <span class="attr">waline:</span></span><br><span class="line">    <span class="attr">serverURL:</span> <span class="string">https://waline.xfm.qzz.io</span></span><br></pre></td></tr></table></figure><div class="xfm-note note-danger"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-close"></use></svg></span><div class="note-main"><div class="note-title">又一个主题</div><div class="note-body"><p>主题 <code>comment.ejs</code> 把配置<strong>原样透传</strong>给 <code>core.js</code> 的 <code>Waline.init()</code>，而 <code>@waline/client</code> <strong>v2 的必填项是驼峰 <code>serverURL</code></strong>，主题自带的 <code>server_url</code> 对 v2 无效。因此站点改用 <code>waline.serverURL</code>。</p><p>服务端已验证可达：<code>GET /</code> → 200，<code>/api/comment</code> 正常返回数据。</p></div></div></div></div><h2 id="六、社交邮箱" class="headline"><a href="#六、社交邮箱" class="headerlink" title="六、社交邮箱"></a>六、社交邮箱</h2><p><code>social.email: mailto:xfm@xfm.qzz.io</code>（连同 <code>github</code>、<code>rss</code> 一起展示）。</p><h2 id="校验" class="headline"><a href="#校验" class="headerlink" title="校验"></a>校验</h2><ul><li>站内 <code>/docs/</code> 链接 <strong>0 失效</strong>，旧路径残留 0；37 篇文档无孤儿；搜索与 sitemap 各 37 条。</li><li>构建 <strong>76 files，0 error</strong>。</li></ul><div class="xfm-note note-info"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-info"></use></svg></span><div class="note-main"><div class="note-title">两点主题层面的根因</div><div class="note-body"><p>「选项卡不切换」与「Waline 键名」两个问题的根源都在主题 <code>hexo-theme-xfm</code>。目前只在站点层做了规避。若在主题仓库修一次（<code>core.js</code> 补 tab 逻辑、键名映射 <code>server_url → serverURL</code>），其它使用该主题的站点也能受益。</p></div></div></div></div>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/docs-migration-and-features/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/docs-migration-and-features/"/>
    <published>2026-10-11T12:00:00.000Z</published>
    <summary>xfm 文档整体迁入 /docs/xfm/，新增文档中心页；同时启用 RSS、编辑此页链接与 Waline 评论，并修复选项卡点击无响应的问题。</summary>
    <title>文档迁入 /docs/xfm/ 并完善订阅、编辑与评论</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="导航" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%AF%BC%E8%88%AA/"/>
    <content>
      <![CDATA[<p>导航栏从「首页 &#x2F; 文档 &#x2F; 归档 &#x2F; 关于」扩展为信息架构更完整的 <strong>七项</strong>，并新增了「笔记」分区入口。</p><span id="more"></span><h2 id="目标结构" class="headline"><a href="#目标结构" class="headerlink" title="目标结构"></a>目标结构</h2><figure class="highlight text code-block" data-lang="text"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Text</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">首页 · 归档 · 分类 · 标签 · 文档 · 笔记 · 更多 ▾</span><br><span class="line">                                          ├─ 友链</span><br><span class="line">                                          └─ 关于</span><br></pre></td></tr></table></figure><p>「更多」在主题里本就支持 <code>children</code> 下拉，直接复用。</p><h2 id="新增笔记入口" class="headline"><a href="#新增笔记入口" class="headerlink" title="新增笔记入口"></a>新增笔记入口</h2><p>「笔记」指向 <code>/notes/</code>，新建 <code>source/notes/index.md</code> 并设置 <code>mode: notes</code>，左侧会渲染按分类归集的笔记树。</p><h2 id="一个坑：Hexo-合并配置时的键顺序" class="headline"><a href="#一个坑：Hexo-合并配置时的键顺序" class="headerlink" title="一个坑：Hexo 合并配置时的键顺序"></a>一个坑：Hexo 合并配置时的键顺序</h2><p>主题自带一份默认菜单（含「更多」），站点 <code>theme_config.menu</code> 会与之合并。问题在于 Hexo 用的是 <code>deepMerge(theme.config, theme_config)</code>，<strong>底层保留主题已有的键序，站点新增的键一律追加到末尾</strong> —— 于是「文档 &#x2F; 笔记」被排到了「更多」之后，顺序错乱。</p><div class="xfm-note note-tip"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-bulb"></use></svg></span><div class="note-main"><div class="note-title">解决方案：站点脚本重排，不改主题</div><div class="note-body"><p>没有去改主题 submodule（那样不可复现），而是新增站点脚本 <code>scripts/menu-order.js</code>：</p><figure class="highlight javascript code-block" data-lang="javascript"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">JavaScript</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// before_generate 时把 theme.menu 的键重排为期望顺序，</span></span><br><span class="line"><span class="comment">// 未列出的键按原序追加，便于日后扩展。</span></span><br></pre></td></tr></table></figure><p>Hexo 会加载站点根目录的 <code>scripts/</code>，因此该脚本无需改动主题即可生效。</p></div></div></div></div><h2 id="校验" class="headline"><a href="#校验" class="headerlink" title="校验"></a>校验</h2><ul><li>导航顺序正确：首页 → 归档 → 分类 → 标签 → 文档 → 笔记 → 更多，下拉内为友链 &#x2F; 关于。</li><li><code>/notes/</code> 渲染 <code>data-mode=&quot;notes&quot;</code>，笔记侧栏按分类分组。</li><li>八个导航目标（<code>/</code>、<code>/archives/</code>、<code>/categories/</code>、<code>/tags/</code>、<code>/docs/</code>、<code>/notes/</code>、<code>/links/</code>、<code>/about/</code>）全部返回 200。</li><li>构建 <strong>73 files，0 error</strong>。</li></ul>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/nav-restructure/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/nav-restructure/"/>
    <published>2026-10-11T08:00:00.000Z</published>
    <summary>导航栏调整为「首页 / 归档 / 分类 / 标签 / 文档 / 笔记 / 更多」，新增笔记页，并用站点脚本精确控制菜单顺序。</summary>
    <title>导航栏重构为七项并新增笔记入口</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="文档" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%96%87%E6%A1%A3/"/>
    <content>
      <![CDATA[<p>本站不再是一份纯粹的文档站，而是一个<strong>默认博客形态</strong>、按需在文档页切到三栏形态的站点。同时把此前手写的 xfm 文档替换为官方整理的完整文档集。</p><span id="more"></span><h2 id="关键机制：单页-front-matter-覆盖主题形态" class="headline"><a href="#关键机制：单页-front-matter-覆盖主题形态" class="headerlink" title="关键机制：单页 front-matter 覆盖主题形态"></a>关键机制：单页 front-matter 覆盖主题形态</h2><p>主题 <code>layout.ejs</code> 的形态解析顺序是：</p><figure class="highlight text code-block" data-lang="text"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Text</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">page.mode  ||  theme.mode  ||  &#x27;blog&#x27;</span><br></pre></td></tr></table></figure><p>也就是说 <strong>单页 front-matter 的 <code>mode</code> 会覆盖主题默认模式</strong>。所以「站点默认 blog + 文档页 docs」可以在同一站共存：</p><div class="table-wrap" tabindex="0"><table><thead><tr><th>页面</th><th>front-matter</th><th>渲染形态</th></tr></thead><tbody><tr><td>首页 &#x2F; 归档 &#x2F; 文章</td><td>无</td><td><code>data-mode=&quot;blog&quot;</code></td></tr><tr><td><code>/docs/</code> 及各文档页</td><td><code>mode: docs</code></td><td><code>data-mode=&quot;docs&quot;</code></td></tr></tbody></table></div><p>据此把 <code>theme_config.mode</code> 由 <code>docs</code> 改为 <strong><code>blog</code></strong>。</p><h2 id="导入官方-xfm-文档集" class="headline"><a href="#导入官方-xfm-文档集" class="headerlink" title="导入官方 xfm 文档集"></a>导入官方 xfm 文档集</h2><p>从外部导入了一套官方 xfm 文档（28 篇，扁平结构 <code>/docs/&lt;slug&gt;/</code>），处理方式：</p><ul><li><strong>替换</strong>：移除此前手写的 <code>source/docs/xfm/</code>（8 篇），改用导入集。</li><li><strong>保留</strong>：<code>source/docs/xongyi/</code>（8 篇）原样保留。</li><li><strong>侧栏</strong>：<code>source/_data/docs.yml</code> 采用导入版的 8 个分组，并在末尾<strong>追加「hexo-theme-xongyi」分组</strong>，共 9 组 &#x2F; 35 条链接。</li></ul><p><code>source/docs/</code> 合计 <strong>36 篇</strong>（28 xfm + 8 xongyi）。</p><h2 id="修复导入内容的一处错误" class="headline"><a href="#修复导入内容的一处错误" class="headerlink" title="修复导入内容的一处错误"></a>修复导入内容的一处错误</h2><p>导入的 <code>tags-tabs-timeline</code> 页里残留了一个 <strong><code>tabs_end</code> 收尾标签</strong> —— 主题并未注册它（只有 <code>tabs</code> &#x2F; <code>endtabs</code>），导致构建抛出：</p><figure class="highlight text code-block" data-lang="text"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Text</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Nunjucks Error: unknown block tag: tabs_end</span><br></pre></td></tr></table></figure><p>删除该行后恢复正常。为此我全量比对了文档用到的全部标签与主题注册标签，确认除它之外没有其它未知标签。</p><div class="xfm-note note-warning"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-warning"></use></svg></span><div class="note-main"><div class="note-title">经验：未知标签会直接中断构建</div><div class="note-body"><p>主题注册的标签有 <code>note</code>、<code>fold</code>&#x2F;<code>collapse</code>、<code>tabs</code>&#x2F;<code>tab</code>、<code>timeline</code>&#x2F;<code>event</code>、<code>row</code>&#x2F;<code>col</code>、<code>button</code>、<code>label</code>、<code>icon</code>、<code>mermaid</code>、<code>linkcard</code>。<strong>没有 <code>tabs_end</code></strong>。导入外部内容时，先扫一遍全文用到的标签名与注册表比对，能省掉一次返工。</p></div></div></div></div><h2 id="结果" class="headline"><a href="#结果" class="headerlink" title="结果"></a>结果</h2><ul><li>构建 <strong>72 files，0 error</strong>。</li><li>侧栏 35 条链接全部命中，36 篇文档无孤儿页。</li><li>搜索索引与 sitemap 各收录 36 条文档。</li></ul>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/11/blog-mode-xfm-docs/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/11/blog-mode-xfm-docs/"/>
    <published>2026-10-11T02:00:00.000Z</published>
    <summary>站点默认形态由 docs 改为 blog，文档页靠 front-matter 覆盖仍走三栏形态；同时导入官方 xfm 文档 28 篇替换手写版本。</summary>
    <title>主题默认形态改为 blog 并导入官方 xfm 文档集</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="Git" scheme="https://xfm0797.github.io/xfm-docs/tags/Git/"/>
    <content>
      <![CDATA[<p>两处调整：站点名称确定为 <strong>「XFM开源官方文档」</strong>；同时把主题的引入方式从「内嵌源码」改为「<code>git submodule</code> 引用官方仓库」，让仓库不再携带主题源码。</p><span id="more"></span><h2 id="站点更名" class="headline"><a href="#站点更名" class="headerlink" title="站点更名"></a>站点更名</h2><p>站点名称由「XFM 主题文档」改为 <strong>「XFM开源官方文档」</strong>，同步更新了这些位置：</p><div class="table-wrap" tabindex="0"><table><thead><tr><th>文件</th><th>变更</th></tr></thead><tbody><tr><td><code>_config.yml</code></td><td><code>title</code> 改为新名称</td></tr><tr><td><code>README.md</code></td><td>站点说明同步</td></tr><tr><td><code>source/about/index.md</code></td><td>关于页站点称谓同步</td></tr><tr><td><code>source/docs/index.md</code></td><td>文档中心欢迎语同步</td></tr></tbody></table></div><p>重构建后，<code>&lt;title&gt;</code> 与导航栏品牌名均已生效。</p><h2 id="主题引用方式：内嵌-→-submodule" class="headline"><a href="#主题引用方式：内嵌-→-submodule" class="headerlink" title="主题引用方式：内嵌 → submodule"></a>主题引用方式：内嵌 → submodule</h2><p>站点使用 <code>hexo-theme-xfm</code>，该主题<strong>源码托管在独立仓库</strong> <code>https://github.com/xfm0797/hexo-theme-xfm</code>。因此本站不应再单独携带一份主题源码，改为以 <strong><code>git submodule</code></strong> 引用：</p><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">rm</span> -r themes/xfm</span><br><span class="line">git submodule add https://github.com/xfm0797/hexo-theme-xfm.git themes/xfm</span><br></pre></td></tr></table></figure><p>效果：仓库中的 <code>themes/xfm</code> 由 <strong>72 个内嵌文件</strong> 变为 <strong>单个 gitlink</strong>（模式 <code>160000</code>），锁定上游提交，构建时按 <code>.gitmodules</code> 检出。</p><div class="xfm-note note-info"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-info"></use></svg></span><div class="note-main"><div class="note-title">首次克隆请注意</div><div class="note-body"><p>因为主题是 submodule，克隆时需带上子模块：</p><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> --recurse-submodules https://github.com/xfm0797/xfm-docs.git</span><br></pre></td></tr></table></figure><p>已克隆的仓库可补执行 <code>git submodule update --init --recursive</code>。</p></div></div></div></div><h2 id="验证" class="headline"><a href="#验证" class="headerlink" title="验证"></a>验证</h2><ul><li><strong>仓库确实不再携带主题源码</strong>：全新 <code>git clone</code> 后 <code>themes/xfm</code> 为空，执行 <code>git submodule update --init --recursive</code> 后检出主题（73 文件）。</li><li><strong>docs 模式不受影响</strong>：上游主题默认 <code>mode: blog</code>，但站点 <code>theme_config.mode: docs</code> 覆盖生效。</li><li>构建 <strong>53 files，0 error</strong>。</li></ul><div class="xfm-note note-tip"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-bulb"></use></svg></span><div class="note-main"><div class="note-title">主题升级方式</div><div class="note-body"><p>后续升级主题只需：</p><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git submodule update --remote themes/xfm</span><br></pre></td></tr></table></figure><p>然后提交新的 gitlink 即可。该主题未发布到 npm，因此只能走 submodule &#x2F; clone 方式。</p></div></div></div></div>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/10/theme-submodule/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/10/theme-submodule/"/>
    <published>2026-10-10T10:00:00.000Z</published>
    <summary>站点改名为「XFM开源官方文档」，并把内嵌的主题源码改为以 git submodule 直接引用官方仓库。</summary>
    <title>站点更名与主题引用方式调整</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="更新日志" scheme="https://xfm0797.github.io/xfm-docs/categories/%E6%9B%B4%E6%96%B0%E6%97%A5%E5%BF%97/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="文档" scheme="https://xfm0797.github.io/xfm-docs/tags/%E6%96%87%E6%A1%A3/"/>
    <category term="部署" scheme="https://xfm0797.github.io/xfm-docs/tags/%E9%83%A8%E7%BD%B2/"/>
    <content>
      <![CDATA[<p>从零搭建文档站的第一步：初始化 Hexo 站点、接入远程仓库、把主题配置为 <strong>docs 模式</strong>，再把两套主题的官方资料解析成结构化文档发布上线。</p><span id="more"></span><h2 id="站点初始化" class="headline"><a href="#站点初始化" class="headerlink" title="站点初始化"></a>站点初始化</h2><p>站点基于 Hexo 8，工作目录为 <code>D:/xfm-work/.xfm-smoke/site</code>。初始化时确认了三件事：</p><ol><li><strong>依赖完整</strong>：站点已装 <code>hexo-renderer-marked</code>、<code>hexo-renderer-ejs</code> 以及 index &#x2F; archive &#x2F; category &#x2F; tag 生成器，可直接 <code>hexo generate</code>。</li><li><strong>主题就位</strong>：<code>themes/xfm</code> 为 <code>hexo-theme-xfm</code>。</li><li><strong>构建可复现</strong>：<code>hexo clean &amp;&amp; hexo generate</code> 通过。</li></ol><h2 id="连接远程仓库" class="headline"><a href="#连接远程仓库" class="headerlink" title="连接远程仓库"></a>连接远程仓库</h2><p>站点初始化为 Git 仓库并绑定远端：</p><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git init -b main</span><br><span class="line">git remote add origin https://github.com/xfm0797/xfm-docs.git</span><br></pre></td></tr></table></figure><p>同时新增 <code>.gitignore</code>，排除 <code>node_modules/</code>、<code>public/</code>、<code>db.json</code> 与 <code>.workbuddy/</code> 等构建产物与本地数据。</p><div class="xfm-note note-warning"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-warning"></use></svg></span><div class="note-main"><div class="note-title">Windows</div><div class="note-body"><p>直接 <code>git push</code> 会因 Git Credential Manager 交互而挂起被中断。解决办法是禁用交互，走缓存凭证：</p><figure class="highlight bash code-block" data-lang="bash"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Shell</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GCM_INTERACTIVE=never GIT_TERMINAL_PROMPT=0 git push origin main</span><br></pre></td></tr></table></figure></div></div></div></div><h2 id="配置-docs-模式" class="headline"><a href="#配置-docs-模式" class="headerlink" title="配置 docs 模式"></a>配置 docs 模式</h2><p>站点以<strong>双重配置</strong>保证运行在 docs 模式：站点 <code>_config.yml</code> 的 <code>theme_config.mode: docs</code> 与主题 <code>_config.yml</code> 的 <code>mode</code> 同时设置为 <code>docs</code>。产物 HTML 上会带 <code>data-mode=&quot;docs&quot;</code>，即三栏文档布局。</p><p>同时更新了站点标题、描述，并在导航中新增「文档」入口。</p><h2 id="解析并生成两套主题文档" class="headline"><a href="#解析并生成两套主题文档" class="headerlink" title="解析并生成两套主题文档"></a>解析并生成两套主题文档</h2><p>内容来源为两套主题仓库的权威资料：</p><div class="table-wrap" tabindex="0"><table><thead><tr><th>主题</th><th>资料来源</th></tr></thead><tbody><tr><td>hexo-theme-xfm</td><td><code>README.md</code> + <code>_config.yml</code></td></tr><tr><td>hexo-theme-xongyi</td><td><code>README.md</code> + <code>_config.yml</code> + <code>examples/</code> 示例配置</td></tr></tbody></table></div><p>据此整理出 <strong>17 篇</strong>文档：文档中心 1 篇、<code>hexo-theme-xfm</code> 8 篇、<code>hexo-theme-xongyi</code> 8 篇。侧栏树 <code>source/_data/docs.yml</code> 随之重构为「开始 &#x2F; hexo-theme-xfm &#x2F; hexo-theme-xongyi」三段。</p><h2 id="踩坑与经验" class="headline"><a href="#踩坑与经验" class="headerlink" title="踩坑与经验"></a>踩坑与经验</h2><details class="xfm-fold"><summary class="fold-summary"><svg class="xfm-icon fold-arrow" aria-hidden="true"><use xlink:href="#xfm-i-chevron-right"></use></svg><span>文档页为什么必须写成「目录 / index.md」？</span></summary><div class="fold-content"><p>一开始把文档写成 <code>source/docs/xfm/adaptive.md</code>，构建产物是 <code>docs/xfm/adaptive.html</code>，而侧栏链接指向 <code>/docs/xfm/adaptive/</code>（pretty URL），两者不匹配导致 404。</p><p><strong>正确写法</strong>是 <code>source/docs/xfm/adaptive/index.md</code>（目录 + index.md），这样才会产出 pretty URL。这条经验后来成为本站文档目录的硬性约定。</p></div></details><h2 id="结果" class="headline"><a href="#结果" class="headerlink" title="结果"></a>结果</h2><ul><li>首次提交 101 个文件，已推送 <code>main</code>。</li><li><code>hexo clean &amp;&amp; hexo generate</code> → <strong>53 files，0 error</strong>。</li><li>侧栏树、激活态、上下篇导航、标签插件（note &#x2F; tabs &#x2F; row &#x2F; mermaid）均正常渲染。</li></ul><p>下一篇将记录：<strong>站点更名与主题引用方式的调整</strong>。</p>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/10/site-init/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/10/site-init/"/>
    <published>2026-10-10T04:00:00.000Z</published>
    <summary>记录本站从初始化、连接远程仓库、配置 docs 模式，到解析并上线两套主题官方文档的完整过程。</summary>
    <title>站点初始化：接入远程仓库并上线两套主题文档</title>
    <updated>2026-10-11T14:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="设计" scheme="https://xfm0797.github.io/xfm-docs/categories/%E8%AE%BE%E8%AE%A1/"/>
    <category term="Hexo" scheme="https://xfm0797.github.io/xfm-docs/tags/Hexo/"/>
    <category term="主题" scheme="https://xfm0797.github.io/xfm-docs/tags/%E4%B8%BB%E9%A2%98/"/>
    <category term="前端" scheme="https://xfm0797.github.io/xfm-docs/tags/%E5%89%8D%E7%AB%AF/"/>
    <content>
      <![CDATA[<p>这是一篇用于演示 XFM 主题排版效果的文章，包含丰富的 Markdown 扩展语法。</p><span id="more"></span><div class="xfm-note note-info"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-info"></use></svg></span><div class="note-main"><div class="note-title">写在前面</div><div class="note-body"><p>XFM 主题支持 <strong>博客 &#x2F; 笔记 &#x2F; 文档</strong> 三种模式，一套配置即可切换形态。</p></div></div></div></div><h2 id="排版演示" class="headline"><a href="#排版演示" class="headerlink" title="排版演示"></a>排版演示</h2><p>普通段落包含 <strong>加粗</strong>、<em>斜体</em>、<del>删除线</del>、<a href="/">内链</a>、<a href="https://hexo.io/" target="_blank" rel="noopener noreferrer nofollow" class="ext-link">外链</a> 与 <code>行内代码</code>。</p><blockquote><p>引用块常用于强调重要观点。<br>支持多行内容。</p></blockquote><h3 id="列表" class="headline"><a href="#列表" class="headerlink" title="列表"></a>列表</h3><ul><li>无序列表项一</li><li>无序列表项二<ul><li>嵌套子项</li><li>另一个子项</li></ul></li><li>无序列表项三</li></ul><ol><li>有序列表项一</li><li>有序列表项二</li><li>有序列表项三</li></ol><ul><li class="task-list-item"><input checked="" disabled="" type="checkbox"> 已完成任务</li><li class="task-list-item"><input disabled="" type="checkbox"> 未完成任务</li></ul><h3 id="表格" class="headline"><a href="#表格" class="headerlink" title="表格"></a>表格</h3><div class="table-wrap" tabindex="0"><table><thead><tr><th>模式</th><th>适用场景</th><th>侧栏形态</th></tr></thead><tbody><tr><td>blog</td><td>个人博客</td><td>右侧挂件栏</td></tr><tr><td>notes</td><td>知识笔记</td><td>左侧笔记树</td></tr><tr><td>docs</td><td>产品文档</td><td>文档树 + 目录</td></tr></tbody></table></div><h2 id="代码演示" class="headline"><a href="#代码演示" class="headerlink" title="代码演示"></a>代码演示</h2><figure class="highlight javascript code-block" data-lang="javascript"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">JavaScript</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> theme = &#123;</span><br><span class="line">  <span class="attr">mode</span>: <span class="string">&#x27;blog&#x27;</span>,</span><br><span class="line">  <span class="attr">features</span>: [<span class="string">&#x27;search&#x27;</span>, <span class="string">&#x27;toc&#x27;</span>, <span class="string">&#x27;lightbox&#x27;</span>]</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> theme;</span><br></pre></td></tr></table></figure><figure class="highlight python code-block" data-lang="python"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">Python</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">def</span> <span class="title function_">hello</span>(<span class="params">name: <span class="built_in">str</span></span>) -&gt; <span class="built_in">str</span>:</span><br><span class="line">    <span class="keyword">return</span> <span class="string">f&quot;Hello, <span class="subst">&#123;name&#125;</span>&quot;</span></span><br></pre></td></tr></table></figure><details class="xfm-fold"><summary class="fold-summary"><svg class="xfm-icon fold-arrow" aria-hidden="true"><use xlink:href="#xfm-i-chevron-right"></use></svg><span>点击查看隐藏内容</span></summary><div class="fold-content"><p>折叠块适合放置冗长的补充材料，默认收起以保持正文清爽。</p></div></details><h2 id="标签插件" class="headline"><a href="#标签插件" class="headerlink" title="标签插件"></a>标签插件</h2><div class="xfm-tabs" id="xfm-tabs-0" data-active="0"><div class="xfm-tabs-nav" role="tablist"><button type="button" class="xfm-tab-btn is-active" data-tab-index="0" role="tab">提示块</button><button type="button" class="xfm-tab-btn" data-tab-index="1" role="tab">选项卡</button><button type="button" class="xfm-tab-btn" data-tab-index="2" role="tab">时间轴</button></div><div class="xfm-tabs-panels"><div class="xfm-tab-panel is-active" data-tab-index="0"><p>支持多种语义色提示块。</p></div><div class="xfm-tab-panel" data-tab-index="1"><p>这是第二个选项卡的内容。</p></div><div class="xfm-tab-panel" data-tab-index="2"><p>时间轴用于展示历程。</p></div></div></div><div class="xfm-timeline" id="xfm-timeline-0"><div class="timeline-item timeline-primary"><div class="timeline-node"><i></i></div><div class="timeline-card"><div class="timeline-head"><time class="timeline-date">2026-01</time><span class="timeline-title">项目立项</span></div><div class="timeline-body"><p>完成主题定位与原型设计。</p></div></div></div><div class="timeline-item timeline-success"><div class="timeline-node"><i></i></div><div class="timeline-card"><div class="timeline-head"><time class="timeline-date">2026-06</time><span class="timeline-title">首个预览版</span></div><div class="timeline-body"><p>三模式布局全部跑通。</p></div></div></div><div class="timeline-item timeline-warning"><div class="timeline-node"><i></i></div><div class="timeline-card"><div class="timeline-head"><time class="timeline-date">2026-10</time><span class="timeline-title">正式发布</span></div><div class="timeline-body"><p>发布 1.0 版本并开源。</p></div></div></div></div><div class="xfm-row"><div class="xfm-col" style="--col-span:6"><p>支持十二栅格布局，左侧列。</p></div><div class="xfm-col" style="--col-span:6"><p>支持十二栅格布局，右侧列。</p></div></div><div class="xfm-note note-success"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-check"></use></svg></span><div class="note-main"><div class="note-title">小贴士</div><div class="note-body"><p>组合使用 <span class="xfm-label label-primary">标签</span> 与 <a class="xfm-btn btn-outline" href="/archives/"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-archive"></use></svg><span>前往归档</span></a> 可以做出丰富的排版。</p></div></div></div></div><a class="xfm-link-card" href="https://hexo.io" target="_blank" rel="noopener noreferrer nofollow"><span class="link-avatar"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-link"></use></svg></span><span class="link-main"><span class="link-title">Hexo 官方站</span><span class="link-desc">快速、简洁且高效的博客框架</span><span class="link-host">hexo.io</span></span><svg class="xfm-icon link-arrow" aria-hidden="true"><use xlink:href="#xfm-i-arrow-right"></use></svg></a><h2 id="数学公式" class="headline"><a href="#数学公式" class="headerlink" title="数学公式"></a>数学公式</h2><p>行内公式 $E&#x3D;mc^2$ 与块级公式：</p><p>$$<br>\int_{-\infty}^{\infty} e^{-x^2} dx &#x3D; \sqrt{\pi}<br>$$</p><h2 id="流程图" class="headline"><a href="#流程图" class="headerlink" title="流程图"></a>流程图</h2><div class="mermaid">graph LR  A[文章] --> B(主题渲染)  B --> C{模式}  C -->|blog| D[卡片流]  C -->|notes| E[笔记树]  C -->|docs| F[三栏文档]</div><h2 id="图片" class="headline"><a href="#图片" class="headerlink" title="图片"></a>图片</h2><p><img src="/images/default-cover.svg" alt="演示图" loading="lazy" decoding="async" data-zoomable="true"></p>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/10/01/hello-xfm/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/10/01/hello-xfm/"/>
    <published>2026-10-01T02:00:00.000Z</published>
    <summary>记录一款三模式 Hexo 主题的设计与实现过程。</summary>
    <title>XFM 主题诞生记</title>
    <updated>2026-10-09T13:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>XFM</name>
    </author>
    <category term="前端" scheme="https://xfm0797.github.io/xfm-docs/categories/%E5%89%8D%E7%AB%AF/"/>
    <category term="CSS" scheme="https://xfm0797.github.io/xfm-docs/tags/CSS/"/>
    <category term="设计系统" scheme="https://xfm0797.github.io/xfm-docs/tags/%E8%AE%BE%E8%AE%A1%E7%B3%BB%E7%BB%9F/"/>
    <content>
      <![CDATA[<p>深色模式不是简单地把背景变黑，而是一整套色彩语义的重构。</p><span id="more"></span><h2 id="三层变量结构" class="headline"><a href="#三层变量结构" class="headerlink" title="三层变量结构"></a>三层变量结构</h2><div class="xfm-note note-tip"><div class="note-inner"><span class="note-icon"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-bulb"></use></svg></span><div class="note-main"><div class="note-title">核心思路</div><div class="note-body"><p>所有组件只消费语义变量，不直接写死颜色。</p></div></div></div></div><figure class="highlight css code-block" data-lang="css"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">CSS</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-pseudo">:root</span> &#123;</span><br><span class="line">  <span class="attr">--c-surface</span>: <span class="number">#ffffff</span>;</span><br><span class="line">  <span class="attr">--c-text</span>: <span class="number">#1b1f26</span>;</span><br><span class="line">  <span class="attr">--c-border</span>: <span class="built_in">rgba</span>(<span class="number">17</span>, <span class="number">24</span>, <span class="number">39</span>, <span class="number">0.08</span>);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-tag">html</span><span class="selector-attr">[data-scheme=<span class="string">&quot;dark&quot;</span>]</span> &#123;</span><br><span class="line">  <span class="attr">--c-surface</span>: <span class="number">#161b23</span>;</span><br><span class="line">  <span class="attr">--c-text</span>: <span class="number">#e6e9ef</span>;</span><br><span class="line">  <span class="attr">--c-border</span>: <span class="built_in">rgba</span>(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">0.09</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="避免闪烁" class="headline"><a href="#避免闪烁" class="headerlink" title="避免闪烁"></a>避免闪烁</h2><p>在 <code>&lt;head&gt;</code> 内联一段同步脚本，先于 CSS 落地 <code>data-scheme</code>：</p><figure class="highlight html code-block" data-lang="html"><figcaption class="code-header"><span class="code-dots"><i></i><i></i><i></i></span><span class="code-lang">HTML</span><div class="code-tools"><button class="code-tool code-copy" type="button" data-xfm-copy aria-label="复制"><svg class="xfm-icon" aria-hidden="true"><use xlink:href="#xfm-i-copy"></use></svg><span class="code-tool-label">复制</span></button></div></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">  <span class="keyword">var</span> dark = <span class="title function_">matchMedia</span>(<span class="string">&#x27;(prefers-color-scheme: dark)&#x27;</span>).<span class="property">matches</span>;</span></span><br><span class="line"><span class="language-javascript">  <span class="variable language_">document</span>.<span class="property">documentElement</span>.<span class="title function_">setAttribute</span>(<span class="string">&#x27;data-scheme&#x27;</span>, dark ? <span class="string">&#x27;dark&#x27;</span> : <span class="string">&#x27;light&#x27;</span>);</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure><div class="table-wrap" tabindex="0"><table><thead><tr><th>方案</th><th>优点</th><th>缺点</th></tr></thead><tbody><tr><td>localStorage</td><td>尊重用户选择</td><td>首屏需防闪烁脚本</td></tr><tr><td>跟随系统</td><td>零配置</td><td>无法手动覆盖</td></tr><tr><td>双优</td><td>三态切换</td><td>实现稍复杂</td></tr></tbody></table></div>]]>
    </content>
    <id>https://xfm0797.github.io/xfm-docs/2026/09/20/dark-mode/</id>
    <link href="https://xfm0797.github.io/xfm-docs/2026/09/20/dark-mode/"/>
    <published>2026-09-20T06:30:00.000Z</published>
    <summary>
      <![CDATA[<p>深色模式不是简单地把背景变黑，而是一整套色彩语义的重构。</p>]]>
    </summary>
    <title>深色模式的实现要点</title>
    <updated>2026-10-11T16:09:52.630Z</updated>
  </entry>
</feed>
