左侧固定栏整合站点标题、菜单、页内目录、社交链接与明暗切换
styx — Hugo 博客模板
作者 vulkoingim
Styx 是一个基于 Hugo 的极简个人博客主题,源自 ezhil,提供左侧固定栏、可切换墨色配色、自托管字体与图标,并支持 Giscus 评论和可选 PostHog 统计。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
四套墨色配色(Vermilion、Sepia、Shibui、Kabuki)独立于明暗模式,选择保存在 localStorage
字体与图标自托管,不请求 Google Fonts 或图标 CDN
Giscus 评论基于 GitHub Discussions,可按页面或内容类型关闭
可选 PostHog 统计,不填 key 则不加载跟踪脚本
支持标签、RSS、Open Graph / Twitter 卡片、自定义 CSS/JS 与单页宽布局
模板详细介绍
Styx 是面向个人博客的 Hugo 主题,从 vividvilla/ezhil 派生而来。它采用左侧固定栏布局,栏内包含站点标题、菜单、文章页的页内目录、社交链接、明暗模式切换以及配色切换;正文区域保持单一阅读栏宽度。主题自带 iA Writer Quattro 与 IBM Plex Mono 字体,字体和图标均为自托管,不依赖 Google Fonts 或图标 CDN。
功能方面,Styx 提供四套独立于明暗模式的墨色配色(Vermilion、Sepia、Shibui、Kabuki),读者选择会存入 localStorage。评论使用 Giscus(基于 GitHub Discussions),需在配置中开启并填写仓库与分类 ID;统计使用可选的 PostHog,不填 key 则不加载跟踪脚本。主题还支持标签、RSS、Open Graph / Twitter 卡片、自定义 CSS/JS,并允许在单页通过 wideContent: true 启用宽布局。
使用限制:需要 Hugo 0.111 或更高版本;Giscus 与 PostHog 依赖外部服务,需自行配置相应参数;演示图片、字体、图标等第三方素材应单独核对许可,不能仅凭代码的 MIT 许可判断。
适合你的项目吗?
适用场景
- 搭建以文字阅读为主的个人博客,需要简洁的左侧导航与阅读栏
- 希望读者能自行切换墨色配色与明暗模式,且偏好不依赖外部字体/图标 CDN
- 使用 GitHub Discussions 作为评论系统,并希望按页面或内容类型控制评论显示
- 需要可选统计但不想默认加载跟踪脚本,或希望接入 PostHog
- 在博客中偶尔插入全宽工具页(如计算器),通过 wideContent 单独启用宽布局
适合人群
- 使用 Hugo 构建个人博客的开发者或写作者
- 偏好极简、编辑式排版与自托管静态资源的用户
- 需要 Giscus 评论与可选 PostHog 统计的站点
- 希望在不改动主题源码的前提下通过配置切换配色、明暗与社交链接的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需要 Hugo 0.111 或更高版本;将主题克隆到 themes/styx 并在站点配置中设置 theme = "styx"。
- 2
在 [params] 中配置 subtitle、mainSections、favicon、mode(dark/light/auto)等基础项。
- 3
启用 Giscus 需设置 giscus = true 并填写 giscusRepo、giscusRepoId、giscusCategory、giscusCategoryId;可用 giscus: false 或 disableGiscusTypes 关闭。
- 4
启用 PostHog 需设置 posthogKey,可选 posthogHost 与 posthogDefaults;省略 key 则不加载跟踪脚本。
- 5
自定义 CSS/JS 通过 customCSS 与 customJS 参数引入;社交图标目前支持 bluesky、mastodon、github、rss。
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 使用该主题需要 Hugo 0.111 或更高版本,低于此版本的 Hugo 无法正常构建。
- 评论功能依赖外部服务 Giscus(基于 GitHub Discussions),必须设置 giscus = true 并填写仓库与分类 ID 后才会加载。
- 统计功能依赖外部服务 PostHog,需设置 posthogKey 才会启用;省略该 key 则不加载跟踪脚本。
- 启用 Giscus 评论需先在 giscus.app 生成仓库与分类 ID,属于外部服务配置步骤。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Requires Hugo 0.111 or later.
README 原文
Comments use [Giscus](https://giscus.app): GitHub Discussions, loaded only when `giscus = true` and the repo IDs are set.
README 原文
Set `posthogKey` to enable. Use `posthogHost = "https://eu.i.posthog.com"` for EU cloud.
README 原文
https://github.com/vulkoingim/styx/blob/master/LICENSE.mdhttps://github.com/vulkoingim/styx/blob/master/README.mdGenerate repo/category IDs at https://giscus.app
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-12。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 80 / 100
- 技术栈
- Hugo
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-08-15
- 截图检查日期
- 2026-10-12
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-13
查看当时使用的来源资料
SHA-256: 0b530c7146e54b6778c2eb8551d535c447101c6083007ae2f826cfaf88a71453
2026-10-12T06:58:04.145Z
来源文件 / 仓库# Styx
Minimal Hugo blog theme with a sticky left rail, switchable ink palettes, and a reading column. Fonts and icons are self-hosted. No Google Fonts, no icon CDN.
Forked from [vividvilla/ezhil](https://github.com/vividvilla/ezhil).
## Demo


## Features
- Left rail: site title, menu, on-this-page TOC on posts, social, light/dark, palettes
- Palettes: Vermilion, Sepia, Shibui, Kabuki (independent of light/dark)
- iA Writer Quattro (regular body, bold titles) and IBM Plex Mono (code)
- [Giscus](https://giscus.app) comments (GitHub Discussions)
- Optional [PostHog](https://posthog.com) analytics
- Tags, RSS, Open Graph / Twitter cards
- Custom CSS / JS
- Wide layout opt-in per page (`wideContent: true`)
## Installation
```sh
cd themes
git clone https://github.com/vulkoingim/styx.git styx
```
Requires Hugo 0.111 or later. See the [Hugo install guide](https://gohugo.io/installation/).
## Configuration
```toml
baseURL = "https://example.com/"
languageCode = "en-us"
title = "My personal blog"
theme = "styx"
copyright = "© Copyright notice"
[markup.highlight]
noClasses = false
guessSyntax = true
[markup.tableOfContents]
startLevel = 2
endLevel = 3
ordered = false
[params]
# Subtitle under the site title. Supports markdown.
subtitle = "stuff and things"
mainSections = ["posts"]
favicon = "icons/myicon.png"
# "dark", "light", or "auto" (follow the OS).
mode = "auto"
# PostHog. Omit posthogKey to disable.
# posthogKey = "phc_..."
# posthogHost = "https://eu.i.posthog.com" # default: https://us.i.posthog.com
# posthogDefaults = "2026-05-30"
# Giscus. Generate repo/category IDs at https://giscus.app
# giscus = true
# giscusRepo = "owner/repo"
# giscusRepoId = "..."
# giscusCategory = "Comments"
# giscusCategoryId = "..."
# Optional (defaults shown):
# giscusMapping = "pathname"
# giscusTheme = "preferred_color_scheme"
# giscusLang = "en"
disableGiscusTypes = ["page"]
# customCSS = "css/custom.css"
# customJS = ["js/extra.js"]
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "All posts"
url = "/posts"
weight = 2
[[menu.main]]
name = "About"
url = "/about/"
weight = 3
[[menu.main]]
name = "Tags"
url = "/tags"
weight = 4
# Supported icons: bluesky, mastodon, github, rss.
[[params.social]]
name = "BlueSky"
icon = "bluesky"
url = "https://bsky.app/profile/example"
[[params.social]]
name = "Mastodon"
icon = "mastodon"
url = "https://mastodon.social/@example"
[[params.social]]
name = "Github"
icon = "github"
url = "https://github.com/example"
[taxonomies]
tag = "tags"
```
## Palettes
Readers can switch palettes in the rail. Choice is stored in `localStorage` and is independent of Auto / Light / Dark.
| Palette | `data-palette` | Light paper |
| --------- | -------------- | --------------- |
| Vermilion | _(default)_ | near-white, red |
| Sepia | `sepia` | parchment |
| Shibui | `shibui` | dusty blue |
| Kabuki | `kabuki` | green wash |
## Giscus
Comments use [Giscus](https://giscus.app): GitHub Discussions, loaded only when `giscus = true` and the repo IDs are set.
Disable on one page:
```md
---
title: "No comments"
giscus: false
---
```
Disable for a content type with `disableGiscusTypes` (see config above).
## PostHog
Set `posthogKey` to enable. Use `posthogHost = "https://eu.i.posthog.com"` for EU cloud. `posthogDefaults` follows the [current snippet](https://posthog.com/docs/libraries/js/config) (`2026-05-30`). Omit the key to ship no tracker.
## Content types
Set `type` in front matter. `page` is a typical static page (about). Control home-page posts with `mainSections`.
```md
---
title: "About"
type: "page"
---
```
For a full-width tool (for example a calculator), set `wideContent: true`.
## Credits
- Original [ezhil](https://github.com/vividvilla/ezhil) by [Vivek R](https://vivekr.net)
- [iA Writer Quattro](https://github.com/iaolo/iA-Fonts) (SIL OFL 1.1)
- [IBM Plex Mono](https://github.com/IBM/plex) (SIL OFL 1.1)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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 · 文档
