Hugo博客

blog-stack — Hugo 博客模板

作者 gavinblog

基于 Hugo 与 hugo-theme-stack 的博客快速启动模板,通过 Hugo Modules 加载主题,并预置 GitHub Actions 自动部署到 GitHub Pages。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

使用 Hugo Modules 加载 hugo-theme-stack 主题,仓库只保留站点结构与配置

02

预置 GitHub Actions 工作流,推送后自动部署到仓库对应的 GitHub Pages

03

包含每日自动更新主题的定时任务

04

支持 GitHub Codespaces,环境已配置 Hugo extended,可直接运行 hugo server

05

站点配置集中在 config 目录,baseurl 等参数可按需修改

模板详细介绍

这是一个面向 Hugo 的博客快速启动模板,使用 Hugo Modules 方式加载 hugo-theme-stack 主题,仓库中带有基础的主题结构与配置文件。模板预置了 GitHub Actions 工作流,可将站点自动部署到仓库对应的 GitHub Pages,并包含一个每日自动更新主题的定时任务。

使用方式上,README 建议通过 GitHub 的 Use this template 创建仓库,再配合 GitHub Codespaces 打开:codespace 已配置好 Hugo extended,运行 hugo server 即可本地预览。站点配置集中在 config 目录,其中 config/_default/config.toml 的 baseurl 需要改为自己的站点地址;编辑完成后提交并推送,GitHub Actions 会自动完成部署。

如果不使用 Codespaces,也可以在本地运行,但需要自行安装 Git、Go 与 Hugo extended。主题更新需手动执行 hugo mod get -u 与 hugo mod tidy;由于 Go module 的限制,模板固定在主题 v3 版本,后续大版本发布时需要修改 config/module.toml 手动升级。部署到其他静态托管平台时,需要确认构建环境安装了 Go,README 以 Vercel 为例给出了覆盖构建命令并设置 HUGO_VERSION 环境变量的做法。

Hugo博客

适合你的项目吗?

适用场景

  • 在 GitHub 上快速创建一个使用 hugo-theme-stack 的博客仓库
  • 通过 GitHub Codespaces 在浏览器中编辑并预览 Hugo 站点
  • 将静态博客自动发布到 GitHub Pages
  • 在本地安装 Git、Go、Hugo extended 后运行和构建站点

适合人群

  • 希望用 Hugo 和 hugo-theme-stack 搭建个人博客的开发者
  • 偏好用 GitHub 仓库与 Actions 管理站点源码和部署流程的用户
  • 需要一份可直接修改配置、替换内容的博客起步结构的人

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    在 GitHub 上点击 Use this template 创建自己的仓库,或直接克隆该模板

  2. 2

    使用 Codespaces 时环境已装好 Hugo extended,运行 hugo server 即可预览

  3. 3

    本地运行需自行安装 Git、Go 与 Hugo extended

  4. 4

    修改 config/_default/config.toml 中的 baseurl 为实际站点地址

  5. 5

    部署到 Vercel 等其他静态托管时需确保构建环境安装 Go,并设置 HUGO_VERSION

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 本地运行需自行安装 Git、Go 与 Hugo extended,环境不满足时无法构建站点。
  • 部署到其他静态托管平台时,构建环境必须安装 Go,否则无法完成构建。
  • 模板固定在主题 v3,主题发布 v4 及以上大版本后需手动修改 config/module.toml 才能升级。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 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/gavinblog/blog-stack/blob/master/LICENSEhttps://github.com/gavinblog/blog-stack/blob/master/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 65 / 100
技术栈
Hugo
网站类型
博客
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2023-05-05
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: 9261108322fff8e7ab5efe93009deee1f33e16024708cb2482440ed45fa57c83

2026-10-03T21:17:58.766Z

来源文件 / 仓库
## 博客地址

> https://gavinblog.github.io/blog-stack/

## 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.

To get started:

1. Click *Use this template*, and create your repository on GitHub.
![Step 1](https://user-images.githubusercontent.com/5889006/156916624-20b2a784-f3a9-4718-aa5f-ce2a436b241f.png)

2. Once the repository is created, create a GitHub codespace asociated with it.
![Create codespace](https://user-images.githubusercontent.com/5889006/156916672-43b7b6e9-4ffb-4704-b4ba-d5ca40ffcae7.png)

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. 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.
![GitHub action](https://user-images.githubusercontent.com/5889006/156916881-90b8bb9b-1925-4e60-9d7a-8026cda729bf.png)
---

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
```

![](https://user-images.githubusercontent.com/5889006/156917172-01e4d418-3469-4ffb-97e4-a905d28b8424.png)

Make sure also to specify Hugo version in the environment variable `HUGO_VERSION` (Use the latest version of Hugo extended):

![Environment variable](https://user-images.githubusercontent.com/5889006/156917212-afb7c70d-ab85-480f-8288-b15781a462c0.png)
</details>
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。