Posts
read more
Hello Hugo:博客的第一篇文章
为什么选择 Hugo
在静态站点生成器中,Hugo 的编译速度是天花板级别的——数千篇文章也能毫秒级构建。 配合 Markdown 写作,整个博客本质上就是一个 Git 仓库:文章即代码,版本即历史。
这套博客的架构
我的博客链路是:本地写文章 → Git 推送 GitHub → Webhook 触发 → VPS 容器内 Hugo 编译 → Nginx 发布。
整条链路全自动,写完推送后几秒钟就能在线上看到新文章,无需任何手动操作。
[WSL 本地] --git push--> [GitHub] --webhook--> [VPS Docker 容器]
│ hugo --minify
▼
[public/ 静态文件]
│
[Nginx → Cloudflare]写作体验
文章就是 content/posts/ 下的一个 Markdown 文件,比如这一篇。
写完之后:
git add content/posts/hello-hugo.md
git commit -m "post: hello hugo"
git push就这么多,剩下的交给自动化。