通过 Hugo Modules 加载 Stack 主题,模板本身不内嵌主题源码
stack-website — Hugo 博客模板
作者 alekzhang
基于 Hugo 的 Stack 主题快速启动模板,通过 Hugo Modules 加载主题,并预置 GitHub Actions 自动部署到 GitHub Pages。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
预置 GitHub Actions,推送后自动部署到 GitHub Pages
带每日定时任务,自动更新所引用的主题
提供基础主题结构与 config 目录配置文件
支持在 GitHub Codespace 中直接运行 hugo server 预览
README 说明了部署到 Vercel 等其他静态托管时的额外步骤
模板详细介绍
这是一个面向 Hugo 主题 Stack 的快速启动模板。它不包含主题本身的源码,而是通过 Hugo Modules 功能引用并加载 Stack 主题,仓库内提供基础的主题结构与配置文件。
模板预置了 GitHub Actions:推送提交后会自动把站点部署到仓库关联的 GitHub Pages;同时还有一个定时任务,每天自动更新主题。README 给出的流程是:以该模板创建名为 `<username>.github.io` 的仓库,在关联的 GitHub Codespace 中运行 `hugo server` 预览,在 `config` 目录中修改配置(包括 `config/_default/config.toml` 里的 `baseurl`),最后在仓库 Settings → Pages 中把构建分支从 `master` 改为 `gh-pages`。
如果不使用 Codespace,也可以在本地运行,但需要自行安装 Git、Go 和 Hugo extended。模板配置的是主题的 v3 版本;由于 Go module 的限制,当主题发布 v4 或更高版本时,需要手动修改 `config/module.toml` 并执行 `hugo mod get -u` 与 `hugo mod tidy` 来更新。部署到 Vercel 等其他静态托管时,需要确保构建机器上装有 Go,并相应覆盖构建或安装命令、指定 Hugo 版本。
适合你的项目吗?
适用场景
- 在 GitHub 上快速搭建一个基于 Stack 主题的个人博客站点
- 用 GitHub Pages 托管 Hugo 站点并希望提交后自动发布
- 希望主题能随上游更新而自动升级的博客项目
- 在 Codespace 或本地环境中预览和调整 Hugo 站点配置
适合人群
- 使用 Hugo 并希望以 Stack 主题起步的博客作者
- 习惯用 GitHub Actions 自动部署静态站点的开发者
- 需要在 GitHub Pages 上托管个人站点的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
以该模板创建名为 `<username>.github.io` 的仓库,并在关联的 Codespace 中运行 `hugo server`
- 2
修改 `config` 目录下的配置文件,并更新 `config/_default/config.toml` 中的 `baseurl`
- 3
在仓库 Settings → Pages 中把构建分支由 `master` 改为 `gh-pages`
- 4
本地运行需自行安装 Git、Go 与 Hugo extended
- 5
主题升级到 v4 及以上时需手动修改 `config/module.toml`,并执行 `hugo mod get -u` 与 `hugo mod tidy`
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 本地运行该模板需自行安装 Git、Go 与 Hugo extended,环境不满足时无法构建站点。
- 部署到 Vercel 等其他静态托管时,构建机器必须安装 Go,否则无法完成构建。
- 主题发布 v4 或更高版本后,因 Go module 限制需手动修改 config/module.toml 并执行更新命令,无法自动升级。
- 使用 GitHub Pages 时需在仓库设置中把构建分支由 master 改为 gh-pages,否则站点无法正常发布。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
You need to install Git, Go and Hugo extended locally.
README 原文
you need to make sure they have Go installed in the machine
README 原文
you need to update the theme manually. (Modifying `config/module.toml` file)
README 原文
https://github.com/alekzhang/stack-website/blob/master/LICENSEhttps://github.com/alekzhang/stack-website/blob/master/README.mdChange the build branch from `master` to `gh-pages`.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 68 / 100
- 技术栈
- Hugo
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-03-18
- 截图检查日期
- 2026-10-03
目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-04
查看当时使用的来源资料
SHA-256: 4008f53b2cb7a6a1f1cd97028d220ec8b962f6985a7716352be78012b6cf55fb
2026-10-03T21:23:00.149Z
来源文件 / 仓库<img align="right" width="150" alt="logo" src="https://user-images.githubusercontent.com/5889006/190859553-5b229b4f-c476-4cbd-928f-890f5265ca4c.png"> # Hugo Theme Stack Starter Template This is a quick start template for [Hugo theme Stack](https://github.com/CaiJimmy/hugo-theme-stack). It uses [Hugo modules](https://gohugo.io/hugo-modules/) feature to load the theme. It comes with a basic theme structure and configuration. GitHub action has been set up to deploy the theme to a public GitHub page automatically. Also, there's a cron job to update the theme automatically everyday. ## Get started 1. Click *Use this template*, and create your repository as `<username>.github.io` on GitHub.  2. Once the repository is created, create a GitHub codespace associated with it.  3. And voila! You're ready to go. The codespace has been configured with the latest version of Hugo extended, just run `hugo server` in the terminal and see your new site in action. 4. Check `config` folder for the configuration files. You can edit them to suit your needs. Make sure to update the `baseurl` property in `config/_default/config.toml` to your site's URL. 5. Open Settings -> Pages. Change the build branch from `master` to `gh-pages`.  6. Once you're done editing the site, just commit it and push it. GitHub action will deploy the site automatically to GitHub page asociated with the repository.  --- In case you don't want to use GitHub codespace, you can also run this template in your local machine. **You need to install Git, Go and Hugo extended locally.** ## Update theme manually Run: ```bash hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v3 hugo mod tidy ``` > This starter template has been configured with `v3` version of theme. Due to the limitation of Go module, once the `v4` or up version of theme is released, you need to update the theme manually. (Modifying `config/module.toml` file) ## Deploy to another static page hostings If you want to build this site using another static page hosting, you need to make sure they have Go installed in the machine. <details> <summary>Vercel</summary> You need to overwrite build command to install manually Go: ``` amazon-linux-extras install golang1.11 && hugo --gc --minify ```  If you are using Node.js 20, you need to overwrite the install command to install manually Go: ``` dnf install -y golang ```  Make sure also to specify Hugo version in the environment variable `HUGO_VERSION` (Use the latest version of Hugo extended):  </details>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

hugo-PaperMod
PaperMod 是 Hugo 生态里知名度较高的主题之一,定位很明确:给博客和轻量作品集站点提供一套干净、响应式的阅读界面。
Hugo · 作品集

LoveIt
❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
Hugo · 博客

hugo-coder
A minimalist blog theme for hugo.
Hugo · 博客

blowfish
Personal Website & Blog Theme for Hugo
Hugo · 博客

hugo-paper
🪺 A simple, clean, customizable Hugo theme
Hugo · 博客

hextra
Hextra 是一个 Hugo 主题,定位在文档站与博客之间:既提供侧边栏导航、目录、面包屑、分页这类文档站结构,也能承载博客内容。
Hugo · 文档
