{
  "categories": {
    "guide": {
      "name": "快速开始",
      "icon": "->",
      "path": "guide",
      "description": "新结构上手与部署入口。",
      "type": "flat",
      "posts": [
        {
          "id": "c21a630f",
          "title": "5 分钟快速开始",
          "date": "2026-06-30",
          "tags": [
            "guide",
            "start"
          ],
          "summary": "从安装到第一篇文章发布，5 分钟内完成。",
          "groupPath": null,
          "category": "guide",
          "categoryName": "快速开始",
          "categoryIcon": "->",
          "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/guide/getting-started.md",
          "sourceRelative": "getting-started.md",
          "draft": false,
          "html": "<h1>5 分钟快速开始</h1>\n<h2>安装</h2>\n<h3>源码构建</h3>\n<pre><code class=\"language-bash\">git clone &lt;repo&gt;\ncd 静态博客\nnode init.js          # 初始化 site/ 工作区\n</code></pre>\n<h3>Docker</h3>\n<pre><code class=\"language-bash\">docker compose -f deploy/docker/docker-compose.yml up -d --build\n</code></pre>\n<h3>npm（开发中）</h3>\n<pre><code class=\"language-bash\">npm install -g static-markdown-blog\nmkdir my-blog &amp;&amp; cd my-blog\nblog init\n</code></pre>\n<h2>第一步：修改站点信息</h2>\n<p>编辑 <code>site/config.yml</code>：</p>\n<pre><code class=\"language-yaml\">site:\n  name: 我的博客\n  alias: 记录与思考\n  description: 一个关于技术与生活的博客。\n  author: 你的名字\n  email: &quot;&quot;\n</code></pre>\n<h2>第二步：写文章</h2>\n<p>在 <code>site/content/posts/</code> 下创建 Markdown 文件：</p>\n<pre><code class=\"language-markdown\">---\ntitle: 我的第一篇文章\ndate: 2026-06-30\ntags: [hello, blog]\nsummary: 这是我的第一篇博客文章。\n---\n\n# 你好世界\n\n这是正文内容。支持 **粗体**、*斜体*、`代码`。\n\n## 代码块\n\n```javascript\nconsole.log(&#39;Hello, blog!&#39;);\n</code></pre>\n<h2>列表</h2>\n<ul>\n<li>第一项</li>\n<li>第二项</li>\n<li>第三项</li>\n</ul>\n<pre><code>\n### 支持的 front-matter 字段\n\n| 字段 | 必填 | 说明 |\n|------|------|------|\n| `title` | 是 | 文章标题 |\n| `date` | 是 | 发布日期（YYYY-MM-DD） |\n| `tags` | 否 | 标签数组 |\n| `summary` | 否 | 摘要（不填则自动截取正文） |\n| `draft` | 否 | `true` 表示草稿，构建时跳过 |\n\n## 第三步：构建与预览\n\n```bash\nnode build.js         # 构建到 dist/\nnode serve.js         # 预览 http://localhost:8080\n</code></pre>\n<h3>构建选项</h3>\n<pre><code class=\"language-bash\">node build.js                    # 全量构建\nnode build.js --incremental      # 增量构建（跳过未变化文件）\nnode build.js --include-drafts   # 包含草稿\n</code></pre>\n<h2>第四步：部署</h2>\n<p><code>dist/</code> 目录即完整产物，可直接部署到：</p>\n<ul>\n<li><strong>GitHub Pages</strong> — 推送到 main 分支自动构建</li>\n<li><strong>Vercel / Netlify / Cloudflare Pages</strong> — 指向 <code>dist/</code> 目录</li>\n<li><strong>Nginx</strong> — 将 <code>dist/</code> 复制到 web 根目录</li>\n<li><strong>Docker</strong> — <code>docker compose up -d --build</code></li>\n</ul>\n<h2>切换主题</h2>\n<p>修改 <code>site/config.yml</code>：</p>\n<pre><code class=\"language-yaml\">theme:\n  active: terminal    # 可选: graphite / aurora / paper / mono / terminal\n</code></pre>\n<p>重新构建即可。主题通过 CSS 变量驱动，切换不需要改任何内容。</p>\n<h2>添加自定义页面</h2>\n<p>在 <code>site/config.yml</code> 的 <code>content.pages</code> 中添加：</p>\n<pre><code class=\"language-yaml\">pages:\n  - id: portfolio\n    name: 作品集\n    type: custom\n    source: content/pages/portfolio.html\n    data:\n      projects: content/data/projects.yml\n</code></pre>\n<p>自定义页面支持：</p>\n<ul>\n<li><strong>嵌入模式</strong> — 显示平台导航栏/页脚，CSS 自动隔离</li>\n<li><strong>独立模式</strong> — <code>standalone: true</code>，隐藏平台 UI，页面自己管理</li>\n<li><strong>数据嵌入</strong> — <code>data</code> 字段指定 YAML/JSON 文件，构建时嵌入</li>\n<li><strong>JS 执行</strong> — <code>scripts: true</code> 显式开启，默认关闭</li>\n</ul>\n<h2>更多功能</h2>\n<table>\n<thead>\n<tr>\n<th>功能</th>\n<th>配置位置</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>瞬间（短内容）</td>\n<td><code>site/content/data/moments.yml</code></td>\n</tr>\n<tr>\n<td>友链</td>\n<td><code>site/content/data/links.yml</code></td>\n</tr>\n<tr>\n<td>图库</td>\n<td><code>site/content/data/gallery.yml</code></td>\n</tr>\n<tr>\n<td>自定义页面</td>\n<td><code>site/content/pages/</code> + <code>site/config.yml</code></td>\n</tr>\n<tr>\n<td>评论</td>\n<td><code>site/config.yml</code> 的 <code>comments</code></td>\n</tr>\n<tr>\n<td>备案信息</td>\n<td><code>site/config.yml</code> 的 <code>beian</code></td>\n</tr>\n<tr>\n<td>数学公式</td>\n<td>文章中写 <code>$E=mc^2$</code> 或 <code>$$\\int_0^1$$</code></td>\n</tr>\n<tr>\n<td>流程图</td>\n<td>文章中写 <code>```mermaid</code> 代码块</td>\n</tr>\n<tr>\n<td>搜索</td>\n<td>自动启用，构建时生成索引</td>\n</tr>\n<tr>\n<td>导航栏按钮</td>\n<td><code>site/config.yml</code> 的 <code>navActions</code></td>\n</tr>\n</tbody></table>\n",
          "_outputPath": "posts/guide/getting-started.html",
          "_needsWrite": true,
          "_cached": false
        },
        {
          "id": "0d666ab9",
          "title": "开源 | 静态 Markdown 博客平台 v1.0.0",
          "date": "2026-06-30",
          "tags": [
            "开源",
            "静态博客",
            "Markdown",
            "主题"
          ],
          "summary": "零依赖、Token 驱动主题、支持任意子路径部署的静态博客平台正式开源。",
          "groupPath": null,
          "category": "guide",
          "categoryName": "快速开始",
          "categoryIcon": "->",
          "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/guide/introduction.md",
          "sourceRelative": "introduction.md",
          "draft": false,
          "html": "<h1>静态 Markdown 博客平台 v1.0.0</h1>\n<p>今天把我的静态博客平台开源了。</p>\n<h2>这是什么</h2>\n<p>一个零依赖的静态博客平台，用 Markdown 写内容，构建时渲染为 HTML，产物是一个完整的静态站点，可以部署到任何地方。</p>\n<p><strong>GitHub：</strong> <a href=\"https://github.com/MG5921MY/static-markdown-blog\">MG5921MY/static-markdown-blog</a></p>\n<p><strong>在线演示：</strong> <a href=\"https://mg5921my.github.io/static-markdown-blog/\">mg5921my.github.io/static-markdown-blog</a></p>\n<h2>为什么做这个</h2>\n<p>市面上的静态博客方案要么主题过时，要么依赖太多，要么不支持现代部署方式（容器化、子路径）。</p>\n<p>我希望有一个：</p>\n<ul>\n<li><strong>零依赖</strong> — 不引入 npm 运行时依赖，vendored 库除外</li>\n<li><strong>精品主题</strong> — 5 个原创主题，45+ CSS Token，三态亮暗切换</li>\n<li><strong>即开即用</strong> — 构建产物自包含，可部署到任意静态托管</li>\n</ul>\n<h2>核心特性</h2>\n<h3>构建系统</h3>\n<ul>\n<li>Markdown 构建时渲染（marked.js）</li>\n<li>RSS、Sitemap、搜索索引（lunr.js + CJK 分词）</li>\n<li>SSG（noscript fallback + JSON 嵌入）</li>\n<li>增量构建、草稿系统</li>\n</ul>\n<h3>主题引擎</h3>\n<p>5 个原创主题，每个都有独特的设计语言：</p>\n<table>\n<thead>\n<tr>\n<th>主题</th>\n<th>风格</th>\n<th>设计参考</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>graphite</td>\n<td>工业蓝图</td>\n<td>Linear + Vercel</td>\n</tr>\n<tr>\n<td>aurora</td>\n<td>品牌展示</td>\n<td>Stripe</td>\n</tr>\n<tr>\n<td>paper</td>\n<td>阅读优先</td>\n<td>Notion + Claude</td>\n</tr>\n<tr>\n<td>mono</td>\n<td>黑白极简</td>\n<td>Vercel</td>\n</tr>\n<tr>\n<td>terminal</td>\n<td>CRT 赛博</td>\n<td>DiskScope</td>\n</tr>\n</tbody></table>\n<p>主题系统基于 CSS Token（45+），支持布局 Token、theme.js 生命周期、模板覆盖、主题自动发现。</p>\n<h3>自定义页面</h3>\n<p>支持四种页面类型：</p>\n<ul>\n<li><strong>Markdown</strong> — 构建时渲染</li>\n<li><strong>HTML</strong> — 自定义 HTML 内容</li>\n<li><strong>Category</strong> — 分类文章列表</li>\n<li><strong>Custom</strong> — 支持 JS 执行、数据嵌入、standalone 模式（iframe 沙盒隔离）</li>\n</ul>\n<p>在线演示中的 <strong>技能</strong>、<strong>作品</strong>、<strong>工具</strong> 页面就是自定义页面的演示。</p>\n<h3>国际化</h3>\n<ul>\n<li>中英双语，语言自动发现</li>\n<li><code>data-i18n</code> 属性 + <code>Blog.t()</code> 双轨翻译</li>\n<li>支持 <code>aria-label</code>、<code>alt</code> 属性国际化</li>\n</ul>\n<h3>部署</h3>\n<ul>\n<li>GitHub Pages（自动构建）</li>\n<li>Docker（本地构建 + ghcr.io 远程拉取双模式）</li>\n<li>通用静态托管（Vercel / Netlify / Cloudflare Pages / Nginx）</li>\n<li>子路径自动适应</li>\n</ul>\n<h2>快速开始</h2>\n<h3>源码构建</h3>\n<pre><code class=\"language-bash\">git clone https://github.com/MG5921MY/static-markdown-blog.git\ncd static-blog\nnode init.js          # 初始化 site/ 工作区\nnode build.js         # 构建到 dist/\nnode serve.js         # 预览 http://localhost:8080\n</code></pre>\n<h3>Docker</h3>\n<pre><code class=\"language-bash\">cd deploy/docker\ndocker compose up -d --build\n# 或从 GitHub Container Registry 拉取\ndocker compose --profile pull up -d\n</code></pre>\n<h3>npm</h3>\n<pre><code class=\"language-bash\">npm install -g https://github.com/MG5921MY/static-markdown-blog/releases/download/v1.0.0/static-markdown-blog-1.0.0.tgz\nblog init\nblog build\nblog serve\n</code></pre>\n<h2>技术细节</h2>\n<ul>\n<li><strong>语言：</strong> JavaScript（Node.js）</li>\n<li><strong>许可证：</strong> Apache-2.0</li>\n<li><strong>测试：</strong> 221 项自动化测试</li>\n<li><strong>依赖：</strong> 运行时零依赖（vendored: marked.js, lunr.js, katex）</li>\n<li><strong>CDN：</strong> 可选增强（highlight.js, Mermaid, DOMPurify），全部非阻塞加载</li>\n</ul>\n<h2>目录结构</h2>\n<pre><code>src/                    平台代码（用户不碰）\n  kernel/               构建引擎\n  plugins/              构建时插件\n  client/               运行时模块\n  pages/                页面模板 + 逻辑\n\nsite/                   用户工作区（唯一需要碰的目录）\n  config.yml            站点配置\n  content/              内容\n  assets/               资源\n  themes/custom/        自定义主题\n\nres/                    平台资源\n  themes/               5 个内置主题\n  locales/              中英双语\n  vendor/               第三方库\n</code></pre>\n<h2>后续计划</h2>\n<ul>\n<li>npm 正式发布（需要解决验证码问题）</li>\n<li>更多主题</li>\n<li>插件市场</li>\n<li>英文文档完善</li>\n</ul>\n<h2>最后</h2>\n<p>这是一个面向所有人的静态博客平台。如果你也想要一个简洁、可控、不被平台绑架的博客，可以试试。</p>\n<p>GitHub：<a href=\"https://github.com/MG5921MY/static-markdown-blog\">MG5921MY/static-markdown-blog</a></p>\n<p>欢迎 Star、Issue、PR。</p>\n",
          "_outputPath": "posts/guide/introduction.html",
          "_needsWrite": true,
          "_cached": false
        }
      ],
      "groups": {}
    },
    "themes": {
      "name": "主题系统",
      "icon": "*",
      "path": "themes",
      "description": "主题设计基线与 token 体系说明。",
      "type": "flat",
      "posts": [
        {
          "id": "23e15b2d",
          "title": "主题系统与设计基线",
          "date": "2026-06-30",
          "tags": [
            "theme",
            "design"
          ],
          "summary": "Token 驱动的 5 主题系统，支持亮暗切换、布局控制、自定义字体和模板覆盖。",
          "groupPath": null,
          "category": "themes",
          "categoryName": "主题系统",
          "categoryIcon": "*",
          "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/themes/theme-system.md",
          "sourceRelative": "theme-system.md",
          "draft": false,
          "html": "<h1>主题系统与设计基线</h1>\n<h2>设计原则</h2>\n<ul>\n<li><strong>Token 驱动</strong> — 主题只需覆盖 CSS 变量，不改页面结构</li>\n<li><strong>暗色模式内置</strong> — 三态切换（自动/亮色/暗色）</li>\n<li><strong>布局可调</strong> — 10+ 布局 token 控制卡片、Hero、文章宽度</li>\n<li><strong>可扩展</strong> — theme.js 生命周期 + 模板覆盖 + 自定义页面</li>\n</ul>\n<h2>内置主题</h2>\n<table>\n<thead>\n<tr>\n<th>主题</th>\n<th>风格</th>\n<th>设计参考</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>graphite</td>\n<td>工业蓝图</td>\n<td>Linear + Vercel</td>\n</tr>\n<tr>\n<td>aurora</td>\n<td>品牌展示</td>\n<td>Stripe</td>\n</tr>\n<tr>\n<td>paper</td>\n<td>阅读优先</td>\n<td>Notion + Claude</td>\n</tr>\n<tr>\n<td>mono</td>\n<td>黑白极简</td>\n<td>Vercel</td>\n</tr>\n<tr>\n<td>terminal</td>\n<td>CRT 赛博</td>\n<td>DiskScope</td>\n</tr>\n</tbody></table>\n<h2>Token 体系</h2>\n<h3>颜色</h3>\n<pre><code class=\"language-css\">--bg-primary        /* 主背景 */\n--bg-secondary      /* 次背景（卡片、面板） */\n--bg-elevated       /* 浮层背景 */\n--text-primary      /* 主文字 */\n--text-secondary    /* 次文字 */\n--text-muted        /* 弱文字 */\n--border            /* 边框 */\n--accent            /* 强调色 */\n--accent-soft       /* 强调色淡底 */\n</code></pre>\n<h3>布局</h3>\n<pre><code class=\"language-css\">--layout-width      /* 最大宽度（默认 1120px） */\n--layout-prose      /* 正文最大宽度（默认 760px） */\n--card-columns      /* 卡片网格列数（auto = 响应式） */\n--card-min-width    /* 卡片最小宽度（默认 280px） */\n--card-gap          /* 卡片间距 */\n--card-direction    /* 卡片方向（column = 纵向，row = 横向列表） */\n--hero-align        /* Hero 对齐（center / left） */\n--post-article-width /* 文章最大宽度（默认 880px） */\n</code></pre>\n<h3>字体</h3>\n<pre><code class=\"language-css\">--font-display      /* 标题字体 */\n--font-body         /* 正文字体 */\n--font-mono         /* 等宽字体 */\n</code></pre>\n<p>主题可通过 <code>@import url(...)</code> 或 <code>@font-face</code> 加载自定义字体。</p>\n<h2>暗色模式</h2>\n<p>平台支持三态切换（导航栏右侧按钮）：</p>\n<table>\n<thead>\n<tr>\n<th>模式</th>\n<th>行为</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>自动</td>\n<td>跟随系统 <code>prefers-color-scheme</code></td>\n</tr>\n<tr>\n<td>亮色</td>\n<td>强制亮色</td>\n</tr>\n<tr>\n<td>暗色</td>\n<td>强制暗色</td>\n</tr>\n</tbody></table>\n<p>主题 CSS 结构：</p>\n<pre><code class=\"language-css\">/* 默认亮色 */\n:root { --bg-primary: #ffffff; }\n\n/* 自动暗色 */\n@media (prefers-color-scheme: dark) {\n  :root:not([data-theme=&quot;light&quot;]) { --bg-primary: #0a0a0a; }\n}\n\n/* 手动暗色 */\n:root[data-theme=&quot;dark&quot;] { --bg-primary: #0a0a0a; }\n</code></pre>\n<h2>自定义主题</h2>\n<p>目录结构：</p>\n<pre><code class=\"language-text\">site/themes/custom/my-theme/\n  theme.yml          ← 元数据\n  theme.css          ← 样式\n  fonts/             ← 可选，本地打包字体\n  templates/         ← 可选，HTML 模板覆盖\n  theme.js           ← 可选，自定义交互\n</code></pre>\n<p>theme.css 最小示例：</p>\n<pre><code class=\"language-css\">@import &quot;../../res/themes/base.css&quot;;\n\n:root {\n  --bg-primary: #ffffff;\n  --text-primary: #1a1a1a;\n  --accent: #0066ff;\n  --font-display: &quot;Inter&quot;, sans-serif;\n}\n</code></pre>\n<p>详见 <code>docs/architecture/theme-engine-reference.md</code>。</p>\n",
          "_outputPath": "posts/themes/theme-system.html",
          "_needsWrite": true,
          "_cached": false
        }
      ],
      "groups": {}
    }
  },
  "allPosts": [
    {
      "id": "c21a630f",
      "title": "5 分钟快速开始",
      "date": "2026-06-30",
      "tags": [
        "guide",
        "start"
      ],
      "summary": "从安装到第一篇文章发布，5 分钟内完成。",
      "groupPath": null,
      "category": "guide",
      "categoryName": "快速开始",
      "categoryIcon": "->",
      "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/guide/getting-started.md",
      "sourceRelative": "getting-started.md",
      "draft": false,
      "_outputPath": "posts/guide/getting-started.html",
      "_needsWrite": true,
      "_cached": false
    },
    {
      "id": "0d666ab9",
      "title": "开源 | 静态 Markdown 博客平台 v1.0.0",
      "date": "2026-06-30",
      "tags": [
        "开源",
        "静态博客",
        "Markdown",
        "主题"
      ],
      "summary": "零依赖、Token 驱动主题、支持任意子路径部署的静态博客平台正式开源。",
      "groupPath": null,
      "category": "guide",
      "categoryName": "快速开始",
      "categoryIcon": "->",
      "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/guide/introduction.md",
      "sourceRelative": "introduction.md",
      "draft": false,
      "_outputPath": "posts/guide/introduction.html",
      "_needsWrite": true,
      "_cached": false
    },
    {
      "id": "23e15b2d",
      "title": "主题系统与设计基线",
      "date": "2026-06-30",
      "tags": [
        "theme",
        "design"
      ],
      "summary": "Token 驱动的 5 主题系统，支持亮暗切换、布局控制、自定义字体和模板覆盖。",
      "groupPath": null,
      "category": "themes",
      "categoryName": "主题系统",
      "categoryIcon": "*",
      "sourcePath": "/home/runner/work/static-markdown-blog/static-markdown-blog/site/content/posts/themes/theme-system.md",
      "sourceRelative": "theme-system.md",
      "draft": false,
      "_outputPath": "posts/themes/theme-system.html",
      "_needsWrite": true,
      "_cached": false
    }
  ]
}