Supports Local Search, requiring RSS enabled and a search page created
hugo_theme — Hugo Blog Template
By binaryHHH
A blog theme ported from Maupassant to Hugo, offering configuration options for site search, categories and tags, table of contents, archives, comments, and analytics.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Preview provided in the project README.
One original preview is available. Open the full image to inspect the design.
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Supports categories, tag cloud, archives by year and date, and display of the latest 10 posts
Table of contents enabled via toc=true in Front Matter, automatically generated from h1~h7 headings
Supports both Disqus and utteranc comment systems, plus GA and Busuanzi analytics
Provides sequence diagram, flowchart, and graphviz drawing support, and custom shortcodes
Custom menus, friendly links, ads, CSS, and JS can be configured via params
Template Details
This template is a Hugo port of the Maupassant theme, based on the Typecho Cho theme and modified from JokerQyou's maupassant-hugo branch. In the README, the author notes the addition of GA analytics, recent posts, tag cloud, custom menus, and date-based archives. The theme is primarily for blogs, with features controlled through params and menu configuration in config.toml.
Feature-wise, the theme supports Local Search, recent posts (showing the latest 10), categories with post counts, tag cloud, table of contents, back to top, keyword SEO, custom menus and ordering, friendly links, archives by year and date, GA analytics, Busuanzi page counter, code highlighting with line numbers, sitemap, RSS, Google site search, See Also, Disqus comments, utteranc comments, custom CSS/JS, some custom shortcodes, custom post summaries, and custom ads. The table of contents requires setting toc=true in the Front Matter; site search requires enabling RSS, setting localSearch=true, and creating content/search/index.md.
The theme also provides support for sequence diagrams, flowcharts, and graphviz drawings, enabled via params.sequenceDiagrams, params.flowchartDiagrams, and the graphviz setting in Front Matter, respectively. Code highlighting uses Hugo's built-in Goldmark renderer instead of the original theme's JS-based highlighting. The README mentions a category name lowercasing issue before Hugo 0.55; the template now displays the original characters for tags and categories by default. URL path lowercasing can be disabled with disablePathToLower.
Usage limitations: the theme requires manually creating content files for archives, search, etc. Comments, analytics, and search depend on external services like Disqus, utteranc, Google Analytics, and Busuanzi, which must be configured per their requirements. The repository has 0 stars and was last updated in 2019. The configuration examples in the README are based on the author's personal blog and need to be adjusted for your own site.
Is it right for your project?
Use Cases
- Building a personal technical blog focused on articles
- Hugo sites needing site search, categories, tags, and archives
- Blogs wanting Disqus or utteranc comments and analytics integration
- Writing scenarios requiring sequence diagrams, flowcharts, or graphviz charts in posts
Suitable For
- Developers using Hugo who want to configure blog features via config.toml
- Users needing a Chinese blog theme and willing to manually create archive and search pages per the README
- Users with experience configuring external services like Disqus, utteranc, GA, or Busuanzi
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Clone the theme into the Hugo site's themes/maupassant directory and set theme = "maupassant" in config.toml
- 2
For site search, enable RSS, set params.localSearch = true, and create content/search/index.md (type: search)
- 3
For post archives, create content/archives/index.md with type must be archives
- 4
For comments and analytics, fill in external service parameters like Disqus shortname, utteranc repo, or GA ID in config.toml
- 5
Code highlighting uses Hugo's built-in Goldmark; configure lineNos and style in markup.highlight
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope applies to this version's code, not to external services or third-party assets.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as-is; warranties and liability limitations are governed by the original license and applicable law.
Additional costs & items to verify
- Disqus comments are optional; enabling requires filling in disqusShortname in config.toml, and comment data is hosted on Disqus external service.
- utteranc comments are optional; they rely on GitHub Issues for comment storage, require configuring repo and other parameters, and depend on GitHub services.
- Google Analytics is optional; enabling requires filling in a GA ID, and data is reported to Google external service.
- Busuanzi page counter is optional; enabling requires setting params.busuanzi = true, and counting depends on the Busuanzi external service.
- Local Search is off by default; it requires enabling RSS, setting localSearch = true, and manually creating content/search/index.md to use.
- Post archives require manually creating content/archives/index.md with type must be archives; otherwise, the archive page is unavailable.
- Table of contents is off by default; it requires setting toc=true in each post's Front Matter to display.
- Copyright notice is optional; the example uses CC BY-NC-ND 4.0, and users can replace name and link themselves.
- The sidebar ad module must be configured via the params.ads array; the example link is an Alibaba Cloud promotional link, not built-in content.
- graphviz drawing requires setting graphviz.enable = true individually in each post's Front Matter to enable.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
- External services such as domain, hosting, database, payment, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
该主题支持Disqus评论,如果要启用Disqus,可以在`config.toml`里添加如下配置即可.
Original README
该主题支持utteranc评论,这是一个基于Github Issue的评论系统
Original README
该主题已经支持了GA分析统计,只需要在`config.toml`配置里加入如下配置即可。
Original README
该主题支持不蒜子这个极简的页面计数器支持
Original README
站内搜索默认是关闭的,如果需要使用需要以下步骤开启。
Original README
Hugo默认是不支持生成归档文件的,需要自己实现。该主题已经实现了文章归档,只需要在新建`content/archives/index.md`文件
Original README
如果要开启一篇文章的文章目录,只需要在`Front Matter` 添加`toc=true`即可,默认是不开启文章目录的。
Original README
该主题支持开启版权声明,如果要启用版权声明,可以在`config.toml`里添加如下配置即可。
Original README
广告模块在侧边栏,可以灵活配置,让博主可以放一些超链接广告、或者图片链接广告。
Original README
https://github.com/binaryHHH/hugo_theme/blob/master/LICENSE.mdhttps://github.com/binaryHHH/hugo_theme/blob/master/README.md需要对每篇文章单独设置是否启用,在`Front Matter` 添加如下内容
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- Less documented · 45 / 100
- Technologies
- Hugo
- Website type
- Blog
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2019-12-20
- Screenshot last checked
- 2026-10-02
No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.
The catalog identifies Hugo as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: 5d7227aea3bb6c73f297ffcb96e68cbacfaf2551484f79cd7dbe43d21a1406a9
2026-10-02T21:14:51.220Z
Source file / repository# Maupassant
Maupassant theme, ported to Hugo.
1. 预览效果:[飞雪无情的博客](http://www.flysnow.org)
2. [English Docs](README_EN.md)
一款非常简洁、性能高的Hugo主题,适配不同的设备(PC,Mobile等)。 主要是基于 Typecho [Cho](https://github.com/pagecho/maupassant/), 从 [JokerQyou](https://github.com/JokerQyou/maupassant-hugo) forked,修改和添加了很多功能而成,如GA统计、最近的文章、标签云、自定义菜单、按日期归档等 .
## Preview

## 功能特性
1. 支持Local Search 站内搜索
2. 最近发表的文章支持,显示最近的10篇
3. 分类支持,并且可以显示分类内的文章数量
4. 标签云支持
5. 文章目录支持
6. 一键回到页面顶部
13. 支持关键字SEO优化
6. 自定义菜单支持,不限个数,自定义排序
7. 自定义友情链接支持
8. 支持文章按年份日期进行归档
9. 支持GA分析统计
17. 不蒜子页面计数器支持
11. 代码高亮、代码行号
10. sitemap站点地图
5. RSS支持,并且可以自动发现RSS
14. Google站内搜索
15. See Also 支持
16. Disqus评论支持
18. 自定义css、js
19. utteranc评论
20. 部分自定义的shortcode
21. 文章自定义摘要
22. 自定义广告支持
## 下载安装
```bash
cd <YOUR Bolg Root Dir>
git clone https://github.com/rujews/maupassant-hugo themes/maupassant
```
## 配置
#### 应用主题
```toml
theme = "maupassant"
```
#### 基本配置
```toml
baseURL = "http://www.flysnow.org"
languageCode = "zh-CN"
title = "飞雪无情的博客"
theme = "maupassant"
## 保持分类的原始名字(false会做转小写处理)
preserveTaxonomyNames = true
## 是否禁止URL Path转小写
disablePathToLower = true
hasCJKLanguage = true
summaryLength = 140
[author]
name = "飞雪无情"
[params]
author = "飞雪无情"
subtitle = "专注于Android、Java、Go语言(golang)、移动互联网、项目管理、软件架构"
keywords = "golang,go语言,go语言笔记,飞雪无情,java,android,博客,项目管理,python,软件架构,公众号,小程序"
description = "专注于IT互联网,包括但不限于Go语言(golang)、Java、Android、Python、项目管理、抖音分析、软件架构等"
busuanzi = true
localSearch = true
[markup]
[markup.highlight]
lineNos = true
style = "github"
```
基本配置大家都比较熟悉,这是我的博客的配置,仅供参考。
#### 代码高亮
从Hugo v0.60.0开始,默认使用`Goldmark`渲染MD文件,并且默认开启了代码高亮,所以该主题原来的代码高亮兼容出现问题,
经过取舍,最终还是选用了Hugo原生的代码高亮方式,去掉了原来主题自带的基于JS的代码高亮。
新的Hugo内置的代码高亮使用非常代码,默认不用任何配置就可以,如果你需要开启行号、或者更换代码样式,可以参考如下配置:
*config.toml*
```toml
[markup]
[markup.highlight]
lineNos = true
style = "github"
```
更多配合和样式参考:
[Configure Markup](https://gohugo.io/getting-started/configuration-markup)
[Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting/)
#### 自定义菜单
```toml
[menu]
[[menu.main]]
identifier = "books"
name = "新书"
url = "/books/"
weight = 2
[[menu.main]]
identifier = "archives"
name = "归档"
url = "/archives/"
weight = 3
[[menu.main]]
identifier = "about"
name = "关于"
url = "/about/"
weight = 4
```
`identifier`标志符必须是唯一的,不能重复;`weight`用于排序,值越小越靠前。
#### 文章目录(大纲)
该主题支持文章目录(大纲),大纲是通过`h1~h7`标题自动生成,在MD文件里就是`##`这类标题的标记,这里建议最多使用两层文章目录,而且最好是从`h2`开始,便于SEO优化。
如果要开启一篇文章的文章目录,只需要在`Front Matter` 添加`toc=true`即可,默认是不开启文章目录的。
```toml
toc = true
```
当左侧空白空间宽度超过100px时,则显示悬浮目录。
#### Local Search 站内搜索
站内搜索默认是关闭的,如果需要使用需要以下步骤开启。
1. 检查`config.toml`的`disableKinds`配置项,是否禁用了RSS,如果禁用需要开启。
2. 在`config.toml`中找到`[params]`配置段落,增加`localSearch = true`开启站内搜索
3. 在`content`目录下新建`search`目录,并且在`search`目录中新建`index.md`文件,内容如下
```
---
title: "搜索"
description: "搜索页面"
type: "search"
---
```
然后`hugo server`启动,打开你的站点,就可以在右上角的搜索框里输入关键字进行站内搜索了。
#### 友情链接
```toml
[[params.links]]
title = "Android Gradle权威指南"
name = "Android Gradle权威指南"
url = "http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e"
[[params.links]]
title = "常用开发工具CDN镜像"
name = "常用开发工具CDN镜像"
url = "http://mirrors.flysnow.org/"
```
`params.links`是一个数组,所以我们可以自定义很多友情链接。`name`表示显示的链接文本,`title`表示鼠标悬停在友情链接时,显示的文本。
#### 广告模块
广告模块在侧边栏,可以灵活配置,让博主可以放一些超链接广告、或者图片链接广告。
```toml
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=jdg9oj97"
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/act/vmpt/aliyun-group/home.html?userCode=jdg9oj97"
img = "https://img.alicdn.com/tfs/TB17qJhXpzqK1RjSZFvXXcB7VXa-200-126.jpg"
[[params.ads]]
title = "领取¥1888阿里云产品通用代金券"
url = "https://promotion.aliyun.com/ntms/act/enterprise-discount.html?userCode=jdg9oj97"
img = "https://img.alicdn.com/tfs/TB1aDXhXpzqK1RjSZFvXXcB7VXa-259-194.jpg"
```
`params.ads`是一个数组,所以我们可以自定义很多广告。如果`img`存在,则优先使用图片广告,`title`表示鼠标悬停在广告链接时,显示的文本。
具体效果参考 [http://www.flysnow.org/](http://www.flysnow.org/)
#### 添加GA分析统计
该主题已经支持了GA分析统计,只需要在`config.toml`配置里加入如下配置即可。
```toml
googleAnalytics = "GA ID"
```
#### 文章归档支持
Hugo默认是不支持生成归档文件的,需要自己实现。该主题已经实现了文章归档,只需要在新建`content/archives/index.md`文件,文件内容为:
```md
title: "归档"
description: Android资深工程师 ,Go和Java打杂师,《Android Gradle权威指南》作者,Android官方技术文档译者
type: archives
```
`title`和`description`都可以换成你自己的,但是`type`必须是`archives`。
`content/archives/index.md`表示在`content/archives/`目录下的`index.md`文件
#### Disqus
该主题支持Disqus评论,如果要启用Disqus,可以在`config.toml`里添加如下配置即可.
```toml
disqusShortname = "yourdiscussshortname"
```
替换成你自己的Disqus名字即可。
#### 自定义文章摘要
该主题采用了Hugo内置的摘要支持,大家可以通过`<!--more-->`自定义自己的摘要,也可以使用自动摘要,使用自动摘要时,可以在`config.toml`中设置摘要的长度
```toml
# 默认是70
summaryLength = 140
```
#### 开启版权声明
该主题支持开启版权声明,如果要启用版权声明,可以在`config.toml`里添加如下配置即可。
```toml
[params.cc]
name = "知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议"
link = "https://creativecommons.org/licenses/by-nc-nd/4.0/"
```
其中`name`和`link`可以换成自己使用的版权声明协议和链接
#### utteranc
该主题支持utteranc评论,这是一个基于Github Issue的评论系统,使用方便,不用翻墙即可评论。
可以在`config.toml`里添加如下配置即可.更多详见 [https://utteranc.es](https://utteranc.es)
```toml
[params.utteranc]
enable = true
repo = "" # 存储评论的Repo,格式为 owner/repo
issueTerm = "pathname" #表示你选择以那种方式让github issue的评论和你的文章关联。
theme = "github-light" # 样式主题,有github-light和github-dark两种
```
对于以上issueTerm可以选择的配置有
1. `pathname` 以路径的方式,推荐选项,这样你换域名的时候就不用担心评论找不到了
2. `url` 全链接URL路径的方式。
3. `title` 按页面title标题的方式。
其他还有几个不常用,这里就不再赘述了。
#### 不蒜子页面计数器支持
该主题支持不蒜子这个极简的页面计数器支持,如果要启用不蒜子,可以在`config.toml`里添加如下配置即可.
```toml
[params]
busuanzi = true
```
#### 关于分类的名称转为小写的问题
`Hugo 0.55` 版本之前, 会有分类转成小写的问题,Hugo提供了`preserveTaxonomyNames`配置,把它设置为`true`就可以了保持原来分类的名字了。
在 `Hugo 0.55` 这个版本,[hugo 移除了 preserveTaxonomyNames 配置](https://gohugo.io/content-management/taxonomies/#example-removing-default-taxonomies),
模板已经默认获取 tag 和 categories 的原始字符用来展示, 大小写的问题已经优雅的解决了。
#### 禁止URL路径小写
默认情况下,URL字符串里的字母都是小写的,这对于分类名、标签名是大写的来说,博客迁移后(比如从Hexo到Hugo),原来的链接就失效了,
为了解决这个问题,Hugo提供了`disablePathToLower`配置。
```toml
## 是否禁止URL Path转小写
disablePathToLower = true
```
#### 自定义CSS&JS
```
[params]
# 这里我存放在了主题的static文件夹里,根目录的似乎也可以
customCSS = ['douban.css', 'other.css']
# if ['custom.css'], load '/static/css/custom.css' file
customJS = ['douban.js']
# if ['custom.js'], load '/static/js/custom.js' file
```
#### 添加了部分自定义的shortcode
* Octopress blockquote (blockquote.html)
* Wikipedia Link Generator (wp.html)
```
{{< youku id="_XMzcxODQ2NjM2NA==" autoplay="true" >}}
```
* youku(youku.html)
#### 绘图支持
- 序列图(使用[js-sequence](https://bramp.github.io/js-sequence-diagrams/))
1. 全局使用,在`config.toml`中添加如下配置
```toml
[params.sequenceDiagrams]
enable = true
options = "" # default: "{theme: 'simple'}"
```
2. 每篇文章单独设置,在`Front Matter` 添加如下内容
```yaml
sequenceDiagrams
enable: true
```
将代码块的语言标识符设置为`sequence`。例如
```
```sequence
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
```
```
- 流程图(使用[flowchart.js](http://flowchart.js.org/))
1. 全局使用,在`config.toml`中添加如下配置
```tom
[params.flowchartDiagrams]
enable = true
options = ""
```
2. 每篇文章单独设置,在`Front Matter` 添加如下内容
```yaml
flowchartDiagrams:
enable: true
```
将代码块的语言标识符设置为`flowchat`或者`flow`。例如
```
```flow
st=>start: Start
op=>operation: Your Operation
cond=>condition: Yes or No?
e=>end
st->op->cond
cond(yes)->e
cond(no)->op
```
```
- graphviz([viz.js](https://github.com/mdaines/viz.js))
需要对每篇文章单独设置是否启用,在`Front Matter` 添加如下内容
```yaml
graphviz:
enable: true
```
将代码块的语言标识符设置为`viz-<engin>`, engin是选用的graphviz绘图引擎的名称,包括`circo`、`dot`、`fdp`、`neato` 、`osage`和`twopi`。例如
```
```viz-dot
digraph G {
subgraph cluster_0 {
style=filled;
color=lightgrey;
node [style=filled,color=white];
a0 -> a1 -> a2 -> a3;
label = "process #1";
}
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #2";
color=blue
}
start -> a0;
start -> b0;
a1 -> b3;
b2 -> a3;
a3 -> a0;
a3 -> end;
b3 -> end;
start [shape=Mdiamond];
end [shape=Msquare];
}
```
```
## 贡献
欢迎大家贡献,不限于代码、Issue,功能特性,想法等等,期待看到你的PR或者ISSUE。
## 其他平台上的 Maupassant 主题
+ Typecho:https://github.com/pagecho/maupassant/
+ Octopress:https://github.com/pagecho/mewpassant/
+ Farbox:https://github.com/pagecho/Maupassant-farbox/
+ Wordpress:https://github.com/iMuFeng/maupassant/
+ Ghost: https://github.com/LjxPrime/maupassant/
+ Hexo: https://github.com/tufu9441/maupassant-hexo
+ Hugo: https://github.com/rujews/maupassant-hugo
```
```
Explore similar templates
Compare previews and descriptions within the same stack and category.

hugo-PaperMod
A fast, clean, responsive Hugo theme for blogs and lightweight portfolios, with three layout modes (Regular, Home-Info, Profile), automatic and manual light/dark themes, Fuse.js client-side search, multilingual support, and built-in Open Graph, Twitter Cards, and Schema.org data.
Hugo · Portfolio

LoveIt
LoveIt is a clean, elegant, and feature-rich Hugo blog theme derived from LeaveIt and KeepIt, MIT-licensed. It offers light/dark modes, responsive layout, multilingual support, and search via Lunr.js or Algolia.
Hugo · Blog

hugo-coder
hugo-coder is a minimalist Hugo blog theme maintained by luizdepra under the MIT license. It provides a clean, text-focused blog appearance, configuration documentation in the docs directory, and a complete exampleSite with hugo.toml.
Hugo · Blog

blowfish
Blowfish is a Hugo personal website and blog theme built with Tailwind CSS 4, focused on lightness, simplicity, and content-first presentation.
Hugo · Blog

hugo-paper
hugo-paper is a simple, clean, and customizable Hugo blog theme configured through config.toml or hugo.toml.
Hugo · Blog

hextra
Hextra is a Hugo theme for documentation and blog sites, built on Hugo and Tailwind CSS with design referencing Nextra.
Hugo · Documentation
