<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo on 十年</title><link>https://676899.xyz/tags/hugo/</link><description>Recent content in Hugo on 十年</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Fri, 16 Oct 2026 23:55:00 +0800</lastBuildDate><atom:link href="https://676899.xyz/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo 个人博客日常写作与发布指南</title><link>https://676899.xyz/posts/hugo/</link><pubDate>Fri, 16 Oct 2026 23:55:00 +0800</pubDate><guid>https://676899.xyz/posts/hugo/</guid><description>&lt;blockquote>
&lt;p>适用环境：Hugo 博客（&amp;ldquo;十年&amp;quot;自创主题）· 服务器 Debian 12&lt;/p>&lt;/blockquote>
&lt;p>本文档记录了从本地编写 Markdown 到最终在服务器上线展示的完整流程。&lt;/p>
&lt;hr>
&lt;h2 id="核心路径备忘">核心路径备忘&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>博客源码目录&lt;/strong>：&lt;code>/root/myblog/&lt;/code>&lt;/li>
&lt;li>&lt;strong>文章存放路径&lt;/strong>：&lt;code>/root/myblog/content/posts/&lt;/code>&lt;/li>
&lt;li>&lt;strong>图片存放路径&lt;/strong>：&lt;code>/root/myblog/static/images/&lt;/code>&lt;/li>
&lt;li>&lt;strong>在线站点地址&lt;/strong>：&lt;code>https://676899.xyz/&lt;/code>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="步骤一本地编写文章">步骤一：本地编写文章&lt;/h2>
&lt;p>在本地电脑上使用常用的 Markdown 编辑器（如 VS Code、Typora、Obsidian 等）新建 &lt;code>.md&lt;/code> 文件。&lt;/p>
&lt;p>文件最上方必须包含 Hugo 的 &lt;strong>Front Matter（元数据头部）&lt;/strong>，正文开头加&amp;quot;适用环境&amp;quot;引用块：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nn">---&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">title&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;你的文章标题&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">date&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="ld">2026-10-16T20:00:00&lt;/span>&lt;span class="m">+08&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="m">00&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">tags&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;标签1&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;标签2&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">categories&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s2">&amp;#34;分类名&amp;#34;&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nn">---&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">&amp;gt; 适用环境：xxx（如：三星 One UI 6.1 · KernelSU）&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>正文编写要点：&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;code>title/date/tags/categories&lt;/code> 四件套一次写全；&lt;/li>
&lt;li>支持所有标准 Markdown 语法、表格以及带高亮的代码块。&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="步骤二文章配图处理可选">步骤二：文章配图处理（可选）&lt;/h2>
&lt;p>如果文章需要插入本地截图或图片：&lt;/p>
&lt;ol>
&lt;li>&lt;strong>上传图片&lt;/strong>：将图片上传至服务器的 &lt;code>/root/myblog/static/images/&lt;/code> 目录（例如 &lt;code>demo.png&lt;/code>）。&lt;/li>
&lt;li>&lt;strong>在文章中引用&lt;/strong>：在 Markdown 正文中直接使用绝对根路径调用：
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-markdown" data-lang="markdown">&lt;span class="line">&lt;span class="cl">![&lt;span class="nt">示例图片&lt;/span>](&lt;span class="na">/images/demo.png&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;em>Hugo 编译时会自动把 &lt;code>static/&lt;/code> 目录下的所有资源映射发布到网站根目录。&lt;/em>&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="步骤三上传与发布">步骤三：上传与发布&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>上传文章&lt;/strong>：使用 SFTP 工具（如 WinSCP，连 &lt;code>155.103.157.117:22222&lt;/code>）将写好的 &lt;code>.md&lt;/code> 文件上传到 &lt;code>/root/myblog/content/posts/&lt;/code>（已发布的文章直接同名覆盖）。&lt;/li>
&lt;li>&lt;strong>终端执行发布&lt;/strong>：SSH 登录服务器，运行：
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">hugo -s /root/myblog --gc --minify
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>主题、配置大改后需要全量重建时，加 &lt;code>--cleanDestinationDir&lt;/code>。&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="步骤四检查与验证生效">步骤四：检查与验证生效&lt;/h2>
&lt;ol>
&lt;li>打开浏览器访问：&lt;code>https://676899.xyz/&lt;/code>&lt;/li>
&lt;li>&lt;strong>缓存处理&lt;/strong>：若浏览器仍显示旧内容，按 &lt;code>Ctrl + F5&lt;/code> 强制刷新，或用无痕窗口查看。&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="步骤五配置一键发布脚本可选">步骤五：配置一键发布脚本（可选）&lt;/h2>
&lt;p>在服务器上创建快捷指令，以后一行命令搞定：&lt;/p></description></item><item><title>重装系统后如何将 Chrome 用户数据无缝迁移并恢复到 D 盘</title><link>https://676899.xyz/posts/chrome_data_relocation_guide-/</link><pubDate>Fri, 16 Oct 2026 22:58:00 +0800</pubDate><guid>https://676899.xyz/posts/chrome_data_relocation_guide-/</guid><description>本文介绍在 Windows 系统重装后，如何利用 NTFS 软链接（Junction）将 Google Chrome 用户数据完美重定向并恢复到 D 盘，实现开箱即用。</description></item></channel></rss>