跳过正文

Cloudflare

用 Hugo 和双栈 CDN 搭建个人网站

··115 字· 1 分钟
同一份 Hugo 静态产物,同时发布到阿里云 OSS/CDN 与 Cloudflare Pages,再由 DNS 分线路把国内外访问导向不同边缘网络。 为什么选 Hugo # 做个人博客选框架,我的第一标准是维护成本低——不想三个月后因为 npm 依赖地狱放弃写作。 Hugo 是单二进制文件,无需 Node.js,构建几千篇文章只需 1-2 秒,Blowfish 主题开箱就有暗色模式、全文搜索、多语言、RSS、Open Graph、阅读时间估算。日常写作只需碰 Markdown。 整体架构 # 这张图同时画出两条不同的路径:从 Git Push 向下看是发布路径,国内外访客经 GeoDNS 进入各自 CDN 则是请求路径。两边必须来自同一次构建,才能避免内容版本漂移。 Hugo 双栈发布:GitHub Actions 只构建一次,产物分别上传到阿里云 OSS/CDN 与 Cloudflare Pages;GeoDNS 决定用户走哪条访问路径,而提交版本保持一致。 这套方案全年花费约 ¥212:

Building a Personal Site with Hugo and Dual-Stack CDN

··375 words· 2 min
One Hugo artifact is published to both Alibaba Cloud OSS/CDN and Cloudflare Pages, while geo-aware DNS sends domestic and international visitors to different edge networks. Why Hugo # When picking a framework for a personal blog, my top criterion was low maintenance cost — I didn’t want to abandon writing three months later because of npm dependency hell.