<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>部署 on Yun 的个人博客</title><link>https://yun7211.github.io/tags/%E9%83%A8%E7%BD%B2/</link><description>Recent content in 部署 on Yun 的个人博客</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Mon, 18 May 2026 09:20:00 +0800</lastBuildDate><atom:link href="https://yun7211.github.io/tags/%E9%83%A8%E7%BD%B2/index.xml" rel="self" type="application/rss+xml"/><item><title>GitHub Pages 部署前检查清单</title><link>https://yun7211.github.io/posts/github-pages-deploy-checklist/</link><pubDate>Mon, 18 May 2026 09:20:00 +0800</pubDate><guid>https://yun7211.github.io/posts/github-pages-deploy-checklist/</guid><description>&lt;h2 id="配置检查"&gt;配置检查
&lt;/h2&gt;&lt;p&gt;部署前先确认 &lt;code&gt;hugo.toml&lt;/code&gt; 中的站点地址、语言、标题和分页配置。&lt;code&gt;baseURL&lt;/code&gt; 会影响线上资源路径，尤其是样式和图片。&lt;/p&gt;
&lt;p&gt;如果使用 GitHub Pages 的用户站点，常见地址是：&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;baseURL&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;https://username.github.io/&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;如果使用项目站点，则通常需要带上仓库名。&lt;/p&gt;
&lt;h2 id="内容检查"&gt;内容检查
&lt;/h2&gt;&lt;p&gt;发布前至少检查这些内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;首页能说明博客主题&lt;/li&gt;
&lt;li&gt;About 页面不是空白&lt;/li&gt;
&lt;li&gt;至少有几篇正式文章&lt;/li&gt;
&lt;li&gt;文章 &lt;code&gt;draft = false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;日期不是未来时间&lt;/li&gt;
&lt;li&gt;图片路径大小写一致&lt;/li&gt;
&lt;li&gt;没有提交私钥、邮箱明文或私人照片&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="actions-检查"&gt;Actions 检查
&lt;/h2&gt;&lt;p&gt;GitHub 仓库的 Pages Source 需要选择 GitHub Actions。工作流构建时要安装 Hugo Extended，并上传 &lt;code&gt;public&lt;/code&gt; 目录作为 Pages artifact。&lt;/p&gt;
&lt;p&gt;常用构建命令是：&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hugo --gc --minify
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="小结"&gt;小结
&lt;/h2&gt;&lt;p&gt;部署问题通常不是 Hugo 本身复杂，而是路径、草稿状态、Actions 权限和 Pages 设置容易漏。上线前做一次清单检查，可以省掉很多排查时间。&lt;/p&gt;</description></item></channel></rss>