默认 Retro 模式采用 NES/FC 8 位像素风格,深蓝背景与白色像素对话框边框
hugo-trainsh — Hugo 启动器模板
作者 binbinsh
hugo-trainsh 是一个以内容阅读为主的 Hugo 主题,默认启用受 NES/FC 8 位 RPG 启发的复古像素风格,并提供 Light 与 Dark 两种可切换模式。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
标题、导航与 UI 使用 Fusion Pixel 12px 字体,并按简中、繁中、日文、拉丁字符提供字体变体
页头可在 Retro、Light、Dark 三种模式间循环切换
内置 toc、tags、recent-posts 三个 shortcode,tags 支持按频率排序与数量限制
代码块带语法高亮、复制按钮和软换行开关,并支持 Mermaid 图表与 KaTeX 数学公式
提供按年份分组的 /blog/ 归档页与 /tags/ 标签页,图片支持图注和 PhotoSwipe 灯箱
模板详细介绍
该主题面向以文字内容为主的 Hugo 站点,默认外观为复古像素风:深蓝背景搭配白色像素对话框边框,标题与导航使用 Fusion Pixel 12px 字体,并按简体中文、繁体中文、日文和拉丁字符提供不同字体变体。代码块采用 NES 调色板语法高亮,标签、分隔线与阴影等元素也沿用像素风格,且不使用 CSS 过渡动画。
除默认的 Retro 模式外,页头提供 Light(太阳图标)与 Dark(月亮图标)两种现代配色,切换顺序为 Retro → Light → Dark → Retro。
功能上包含文章与页面的阅读布局、按年份分组的 /blog/ 归档页和 /tags/ 标签页,以及 toc、tags、recent-posts 三个内置 shortcode。代码块支持语法高亮、复制按钮与软换行开关,并支持 Mermaid 图表、KaTeX 数学公式、带图注的图片与 PhotoSwipe 灯箱。主题还提供多语言支持和页脚社交链接。
使用前需注意:mainSections 必须与实际文章目录一致(content/posts/ 对应 ["posts"],content/blog/ 对应 ["blog"]);/blog/ 页面需要手动创建 content/blog/_index.md 才会启用。
适合你的项目吗?
适用场景
- 搭建以文章阅读为主的个人博客或技术笔记站点
- 希望站点呈现 8 位游戏或复古像素视觉风格的 Hugo 项目
- 需要在同一站点中提供复古、浅色、深色三种配色切换的内容站
- 发布包含代码块、Mermaid 图表或 KaTeX 数学公式的技术文章
- 面向多语言读者、需要按语言调整像素字体变体的站点
适合人群
- 使用 Hugo 并希望快速套用现成主题的内容创作者
- 偏好像素风、复古游戏审美的个人站点维护者
- 需要归档页、标签页与文章内目录等技术写作场景的开发者
- 接受以内容阅读为主、不追求复杂页面模块的站点
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
通过 git submodule 将仓库添加到 themes/hugo-trainsh,并执行 git submodule update --init --recursive
- 2
在站点配置中设置 theme = "hugo-trainsh",并配置 [params] mainSections 以匹配文章实际所在目录
- 3
如需 /blog/ 页面,需手动创建 content/blog/_index.md
- 4
如需 JSON 输出用于自定义索引或搜索,可在 [outputs] 中为 home 添加 "JSON"
- 5
详细用法参见仓库内的 docs/usage.md
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/binbinsh/hugo-trainsh/blob/main/LICENSEhttps://github.com/binbinsh/hugo-trainsh/blob/main/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Hugo Themes
- 资料与维护参考分
- 资料较完整 · 87 / 100
- 技术栈
- Hugo
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-05-06
- 截图检查日期
- 2026-10-03
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 6055ae6399c5270504c4b2e3757b06ad466643278ff2760308f44d26909c0887
2026-10-03T06:46:40.669Z
来源文件 / 仓库# hugo-trainsh
A minimal, content-first Hugo theme — defaults to a **NES/FC retro pixel style** inspired by classic 8-bit RPGs.
## Retro Mode (Default)
The theme ships with a **Retro** mode enabled by default, inspired by the NES/FC era:
- Deep-blue background (`#00237C`) with white pixel-art dialog borders
- **Fusion Pixel 12px** font for headings, navigation, and UI elements
- Per-language font variants: Simplified Chinese, Traditional Chinese, Japanese, and Latin
- NES palette syntax highlighting for code blocks
- RPG-style gold tags, pixel dashed `<hr>`, hard shadows, zero border-radius
- No CSS transitions — everything snaps like an 8-bit console
Two additional modes are available via the header toggle: **Light** and **Dark** (clean, modern palettes). The cycle is: Retro (gamepad) → Light (sun) → Dark (moon) → Retro …
## Features
- Clean reading layout for posts and pages
- `/blog/` archive (grouped by year) and `/tags/` taxonomy pages
- Built-in shortcodes:
- `{{< toc >}}`
- `{{< tags >}}` / `{{< tags sort="freq" limit="20" >}}`
- `{{< recent-posts limit="5" >}}`
- Code blocks with syntax highlighting, copy button, and soft-wrap toggle
- Mermaid diagrams and KaTeX math rendering
- Image rendering with figure captions + PhotoSwipe lightbox
- Three theme modes: Retro (default), Light, and Dark
- Multilingual support (with per-language pixel font variants) and footer social links
## Quick Start
```bash
git submodule add https://github.com/binbinsh/hugo-trainsh themes/hugo-trainsh
git submodule update --init --recursive
```
In your site config:
```toml
theme = "hugo-trainsh"
[params]
mainSections = ["posts"]
```
`mainSections` must match where your posts live (`content/posts/` -> `["posts"]`, `content/blog/` -> `["blog"]`).
Optional JSON output (for custom index/search use cases):
```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
```
Create `content/blog/_index.md` to enable the `/blog/` page.
## Documentation
- Usage guide: [`docs/usage.md`](docs/usage.md)
## Theme Info
- Demo: [hugo-trainsh.pages.dev](https://hugo-trainsh.pages.dev)
- Repository: [github.com/binbinsh/hugo-trainsh](https://github.com/binbinsh/hugo-trainsh)
- Author: [Binbin Shen](https://github.com/binbinsh)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

hugo-xmin
eXtremely Minimal Hugo theme: about 140 lines of code in total, including HTML and CSS (with no dependencies)
Hugo · 启动器

hugo-theme-gallery
Gallery Theme for Hugo
Hugo · 启动器

reveal-hugo
📽️ Create rich HTML-based presentations with Hugo and Reveal.js
Hugo · 启动器

anatole
Anatole is a minimalistic two-column theme for Hugo.
Hugo · 启动器

hugo-theme-diary
Moments piled up. A Hugo theme ported from SumiMakito/hexo-theme-Journal.
Hugo · 启动器

risotto
A minimalist, responsive hugo theme inspired by terminal ricing aesthetics.
Hugo · 启动器
