<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>22-7's information</title><link>https://22-7-co.github.io/algolia.json</link><description>Recent content from 22-7's information</description><generator>Hugo</generator><language>zh-CN</language><managingEditor>x22han7@gmail.com (22/7.)</managingEditor><webMaster>x22han7@gmail.com (22/7.)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Wed, 08 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://22-7-co.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>从零开始用 Hugo 搭建个人博客（搭建博客传统，第一条博客教别人搭）</title><link>https://22-7-co.github.io/post/1.my-first-post/</link><pubDate>Wed, 08 Apr 2026 00:00:00 +0000</pubDate><author>x22han7@gmail.com (22/7.)</author><guid>https://22-7-co.github.io/post/1.my-first-post/</guid><description>
<![CDATA[<h1>从零开始用 Hugo 搭建个人博客（搭建博客传统，第一条博客教别人搭）</h1><p>作者：22/7.（x22han7@gmail.com）</p>
        
          <h3 id="为什么选择-hugo-搭建个人博客">
<a class="header-anchor" href="#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%80%89%e6%8b%a9-hugo-%e6%90%ad%e5%bb%ba%e4%b8%aa%e4%ba%ba%e5%8d%9a%e5%ae%a2"></a>
为什么选择 Hugo 搭建个人博客？
</h3><p>在搭建个人博客时，我对比过 Hexo、WordPress、Next.js 等方案，最终选择了 <strong>Hugo</strong>。</p>
<p><strong>主要原因如下：</strong></p>
<ul>
<li><strong>极致速度</strong>：Hugo 是目前公认的“世界上最快的静态站点生成器”。用 Go 语言编写，即使你的博客有上千篇文章，构建时间也通常在几秒钟内完成（很多时候不到 1 秒）。本地预览和部署都非常流畅。</li>
<li><strong>安全且维护成本低</strong>：生成的是纯静态 HTML 文件，没有数据库，没有后端脚本，几乎不可能被 SQL 注入或恶意攻击。部署后基本“一次部署，长期稳定”。</li>
<li><strong>完全免费 + 轻量</strong>：配合 GitHub Pages、Cloudflare Pages 等免费平台使用，零服务器成本。只需要一个二进制文件就能运行，不需要 Node.js、Ruby 等复杂环境。</li>
<li><strong>Markdown 写作友好</strong>：所有文章用 Markdown 编写，专注内容本身，不用操心样式。</li>
<li><strong>主题丰富，灵活性强</strong>：有几百个高质量主题（我目前用的是 Reimu 主题，颜值和功能都很不错）。</li>
</ul>
<p>一句话总结：<strong>如果你想要速度快、安全、省钱、长期好维护的个人博客或作品集，Hugo 是目前最优的选择之一</strong>。</p>
<hr>
<h3 id="第一步安装-hugo">
<a class="header-anchor" href="#%e7%ac%ac%e4%b8%80%e6%ad%a5%e5%ae%89%e8%a3%85-hugo"></a>
第一步：安装 Hugo
</h3><p><em>Hugo快速入手教程： <a href="https://hugo.opendocs.io/getting-started/quick-start">Hugo</a></em></p>
<h3 id="第二步-安装-reimu-主题">
<a class="header-anchor" href="#%e7%ac%ac%e4%ba%8c%e6%ad%a5-%e5%ae%89%e8%a3%85-reimu-%e4%b8%bb%e9%a2%98"></a>
第二步: 安装 Reimu 主题
</h3><p><em>Reimu 项目地址：<a href="https://github.com/D-Sketon/hugo-theme-reimu/tree/main">Reimu</a></em></p>
<h3 id="第三步-挂载到github-pages">
<a class="header-anchor" href="#%e7%ac%ac%e4%b8%89%e6%ad%a5-%e6%8c%82%e8%bd%bd%e5%88%b0github-pages"></a>
第三步: 挂载到Github Pages
</h3><p><em>Github pages快速入门地址: <a href="https://docs.github.com/zh/pages/quickstart">Github Pages</a></em></p>
<h3 id="finished">
<a class="header-anchor" href="#finished"></a>
Finished
</h3><p>目前你的博客应该可以正常运行了！</p>
<p>搭建过程中应该会遇到问题，相信你能凭借 AI 和 自己的智慧解决一切困难。</p>
<p>下一篇文章见～</p>
        
        <hr><p>本文2026-04-08首发于<a href='https://22-7-co.github.io/'>22-7's information</a>，最后修改于2026-04-08</p>]]></description><category>建站教程</category></item></channel></rss>