为什么选 Hugo

内容即 Markdown,构建出纯静态 HTML,部署到 Cloudflare Pages 几乎零运维。

最小步骤

  1. 初始化:hugo new site mysite,把布局写在 layouts/。
  2. 组织内容:content/books、content/tools、content/dao、content/life 各建 _index.md。
  3. 搜索:构建后跑 npx pagefind --site public,页面引 /pagefind/pagefind-ui.js。
  4. 暗色:CSS 用 [data-theme] 变量,JS 切换并写入 localStorage。

行动清单

  • 每次写完文章,本地 hugo server 预览。
  • 推到 Git,Cloudflare Pages 自动构建上线。