Hugo博客启动器

hugo-theme-stack-starter — Hugo 博客模板

作者 CaiJimmy

基于 Hugo Modules 加载 hugo-theme-stack 的博客快速启动模板,内置 GitHub Actions 自动部署到 GitHub Pages。

看看你的网站会是什么样

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

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

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

全部页面与视图 2

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

采集于 2026-09-30查看来源

值得关注的模板亮点

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

01

通过 Hugo Modules 加载 hugo-theme-stack,主题不直接写入仓库

02

预置 GitHub Actions 工作流,推送后自动部署到 GitHub Pages

03

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

04

配置集中在 config 目录,便于按站点需求修改

05

提供从创建仓库到部署的图文步骤与视频教程

模板详细介绍

这是一个用于创建 Hugo 博客的快速启动模板,主题为 hugo-theme-stack,通过 Hugo Modules 功能加载主题,而不是把主题源码直接放进仓库。模板自带基础的主题结构与配置文件,配置集中在 config 目录中,其中 config/_default/config.toml 的 baseurl 需要改成站点实际地址。

仓库预置了 GitHub Actions 工作流,可将站点自动部署到该仓库对应的 GitHub Pages;另有一个定时任务每天自动更新主题。README 提供了从点击 Use this template 创建仓库、在 GitHub Codespaces 中运行 hugo server 预览、到提交推送触发部署的完整步骤,并附有一段视频教程。

模板默认按主题的 v4 版本配置。由于 Go module 的机制限制,v4 及以上版本发布后需要手动更新主题,方式是在本地执行 hugo mod get -u 与 hugo mod tidy,或修改 config/module.toml。若不想使用 Codespaces,也可以在本地运行,但需要预先安装 Git、Go 和 Hugo extended。除 GitHub Pages 外,模板也可部署到其他静态托管,具体参考 Hugo 官方托管文档。

Hugo博客启动器

适合你的项目吗?

适用场景

  • 用 GitHub 仓库快速搭建一个 Hugo 博客并发布到 GitHub Pages
  • 在 GitHub Codespaces 中在线编辑和预览站点,无需本地环境
  • 在本地安装 Git、Go 与 Hugo extended 后运行和调试站点
  • 把同一份站点配置部署到 GitHub Pages 之外的其他静态托管

适合人群

  • 希望用 Hugo 和 hugo-theme-stack 起步写博客的个人用户
  • 习惯用 GitHub 仓库与 Actions 管理站点构建和发布的开发者
  • 需要一份可跟随主题更新、结构清晰的博客起始配置的用户

上手与定制指南

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

  1. 1

    在 GitHub 上点击 Use this template 创建仓库,仓库名建议为 <username>.github.io,否则站点地址会带上仓库名路径

  2. 2

    在仓库 Settings -> Pages 中把 Build and deployment 的 Source 设为 GitHub Actions

  3. 3

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

  4. 4

    本地运行需安装 Git、Go 和 Hugo extended;在 Codespaces 中可直接执行 hugo server 预览

  5. 5

    主题 v4 及以上版本发布后需手动更新:执行 hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v4 与 hugo mod tidy,或修改 config/module.toml

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 本地运行该模板需自行安装 Git、Go 与 Hugo extended 环境,否则无法在本地构建和预览站点。
  • 主题 v4 及以上版本发布后无法自动升级,需手动执行 hugo mod get -u 与 hugo mod tidy 或修改 config/module.toml 才能更新主题。
  • 若仓库名不是 <username>.github.io,站点将发布在带仓库名子路径的地址下,需相应调整 baseurl。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

You need to install Git, Go and Hugo extended locally.

README 原文

you need to update the theme manually

README 原文

create your repository as `<username>.github.io` on GitHub

README 原文
https://github.com/CaiJimmy/hugo-theme-stack-starter/blob/master/LICENSEhttps://github.com/CaiJimmy/hugo-theme-stack-starter/blob/master/README.md

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

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 96 / 100
技术栈
Hugo
网站类型
博客 · 启动器
这个分数如何计算

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: c3195c3c623227d5e0d8ddfcbf2b506ea2a8a93544c52ac72a92cac36cf2674b

2026-10-02T15:29:21.812Z

来源文件 / 仓库
<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.

## Video Tutorial

In case you got lost during the setup process, here's a video tutorial that setups a new Hugo site using this template, and deploys it to GitHub Pages: https://www.youtube.com/watch?v=8qDdQQ6Ifxo

## Get started

1. Click *Use this template*, and create your repository as `<username>.github.io` on GitHub. (You can also use a different repository name, but then the resulting website will be available at `https://<username>.github.io/<repository-name>`. )
![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 associated with it.
![Create codespace](https://user-images.githubusercontent.com/5889006/156916672-43b7b6e9-4ffb-4704-b4ba-d5ca40ffcae7.png)

3. While waiting for the codespace to be created, go to `Settings` -> `Pages` of your newly created repository, and set `Build and deployment` -> `Source` to `GitHub Actions`.
![Change build and deployment source](https://github.com/user-attachments/assets/192459bf-25d8-441e-8029-c108d789e449)

4. After the codespace is created, you can test that the site is built successfully by running `hugo server` in the terminal and see your new site in action. 

5. 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. For example, if your new repository is named `my-blog`, then the `baseurl` should be `https://<username>.github.io/my-blog/`.

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.** For more information, check official Hugo documentation: https://gohugo.io/installation/

## Update theme manually

Run:

```bash
hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v4
hugo mod tidy
```

> This starter template has been configured with `v4` 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

Check official Hugo documentation: https://gohugo.io/host-and-deploy/
反馈内容错误

看看同类模板

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