这个博客是怎么跑起来的#
第一篇,先把博客自身的部署链路记下来,顺便验证一下样式和代码高亮。
整条链路:
- 本地
hugo new content posts/xxx.md写文章。 git push到自托管的 Gitea。- Gitea Actions 的
vps-runner(host 执行器)拉代码、跑hugo --minify。 - 构建产物
public/直接cp到主机/var/www/blog.m1ngdaxie.com。 - 主机 nginx 直接 serve 静态文件,Cloudflare 在前面套 CDN + TLS。
没有容器、没有数据库,纯静态,稳。
代码高亮测试#
package main
import "fmt"
func main() {
fmt.Println("hello, blog")
}hugo new content posts/my-first-real-post.md
git add . && git commit -m "new post" && git push
# 几十秒后自动上线接下来#
- 写点 k3s / Tailscale 组网的踩坑
- 整理 Go 后端的实时协作笔记
- 也许加上 giscus 评论
如果你能看到这页且代码块有高亮,说明部署成功了 🎉