使用 Tailwind CSS 构建的卡片式博客布局
hugo-theme-tailwind — Hugo 博客模板
作者 tabs-not-spaces
基于 Tailwind CSS 构建的 Hugo 博客主题,采用卡片式布局,支持深色模式、多语言、站内搜索与评论系统。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
支持深色模式,可手动切换或跟随系统偏好
内置基于 fuse.js 与 mark.js 的站内搜索
可配置 Disqus 与 giscus 评论系统
支持多语言与响应式设计
提供 JSON-LD 结构化数据与 PWA 可选支持
模板详细介绍
这是一个面向博客场景的 Hugo 主题,使用 Tailwind CSS 编写样式,整体呈现卡片式布局。主题提供深色模式切换(可跟随系统偏好)、响应式设计、多语言支持,以及基于 fuse.js 与 mark.js 的站内搜索。文章可配置封面图,并支持图片懒加载与 srcset 处理。
在集成方面,主题内置了 Google Analytics、Disqus 与 giscus 评论的配置项,提供社交媒体链接设置,并支持通过 front matter 或配置文件启用 JSON-LD 结构化数据。此外还包含 bilibili、asciinema 等额外 shortcode,以及可选的 PWA 支持。
安装方式支持 Git Submodule 与 Hugo Module 两种。主题代码采用 MIT 许可,可免费使用、修改与分发;但演示站点中的图片、字体、图标等第三方素材需单独核对各自许可,域名、托管等外部服务也可能产生费用。
适合你的项目吗?
适用场景
- 搭建个人技术博客或写作站点
- 需要深色模式与站内搜索的博客项目
- 希望使用 Tailwind CSS 自定义样式的 Hugo 站点
- 需要集成评论系统与社交链接的博客
适合人群
- 使用 Hugo 构建博客的开发者
- 偏好 Tailwind CSS 工作流的用户
- 需要多语言博客支持的作者
- 希望快速配置评论与搜索功能的站点维护者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
可通过 Git Submodule 或 Hugo Module 两种方式安装主题
- 2
示例站点的 giscus 配置使用了作者自己的仓库,使用前应替换为自己的仓库
- 3
启用 JSON-LD 与 PWA 需在配置文件或 front matter 中手动开启,默认关闭
- 4
自定义样式需使用 pnpm 安装依赖并通过 pnpm dev 进行开发
- 5
演示图片、字体、图标等第三方素材需按各自许可单独核对
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 示例站点的 giscus 评论配置默认使用作者本人的仓库,使用者应通过 giscus.app 将其替换为自己的仓库,否则评论功能会指向作者仓库。
- 启用 Google Analytics 需自行提供 Google Analytics ID 并写入 hugo.toml,属于外部服务,可能涉及账号与费用。
- 评论功能依赖 Disqus 或 giscus 等第三方外部服务,需自行注册配置,可能受其服务条款与费用约束。
- 站内搜索依赖 fuse.js 与 mark.js 两个第三方库,其许可与使用条件需单独核对。
- 主题使用的 SVG 图标来自 tabler icons 第三方项目,图标素材的许可需单独核对。
- exampleSite 内容取自 hugoBasicExample 并做了修改,该示例内容可能适用不同的许可条款。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
> The exampleSite's `giscus` setting uses my own profile repo. > You **SHOULD** change it to your own repo (by using <https://giscus.app/>).
README 原文
Google Analytics - add your Google Analytics ID to `hugo.toml`
README 原文
Comments settings for [disqus](https://disqus.com/) and [giscus](https://giscus.app/)
README 原文
Search (by using [fuse.js](https://fusejs.io/) and [mark.js](https://markjs.io/))
README 原文
SVG icons thanks to [tabler icons](https://tabler-icons.io/)
README 原文
https://github.com/tabs-not-spaces/hugo-theme-tailwind/blob/main/LICENSEhttps://github.com/tabs-not-spaces/hugo-theme-tailwind/blob/main/README.md> `exampleSite` is fetched from https://github.com/gohugoio/hugoBasicExample with some modifications.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-05。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 74 / 100
- 技术栈
- Hugo
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2025-03-26
- 截图检查日期
- 2026-10-05
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-05
查看当时使用的来源资料
SHA-256: 2bc322f93837faa44c4b04607dc9cad5cd2108c18daf6a66483f7bff3a8719b1
2026-10-05T00:45:30.216Z
来源文件 / 仓库# Hugo Theme Tailwind
<img align="right" width="128" alt="logo" src="https://raw.githubusercontent.com/tomowang/hugo-theme-tailwind/main/static/logo.svg">


[](https://gohugo.io/)
[](https://tailwindcss.com/)

Hugo theme built using [Tailwind CSS](https://tailwindcss.com/), mostly for bloggers.
Check [https://hugo-theme-tailwind.tomo.dev/](https://hugo-theme-tailwind.tomo.dev/) for demo.

## Features
* High Lighthouse score
* Dark mode - switch between light and dark mode, or default by system prefers.
* SVG icons thanks to [tabler icons](https://tabler-icons.io/)
* Google Analytics - add your Google Analytics ID to `hugo.toml`
* Comments settings for [disqus](https://disqus.com/) and [giscus](https://giscus.app/)
* Social media link data settings
* Additional short code: bilibili, asciinema
* Responsive design
* Multilingual
* Default image process for lazy load and srcset
* Search (by using [fuse.js](https://fusejs.io/) and [mark.js](https://markjs.io/))
* Image support for article (using `image` param in front matter)
* Structured data [JSON-LD](https://json-ld.org/) for article (enable `jsonLD` in config file or front matter)
* Simple [PWA](https://web.dev/add-manifest/) support - check `params.pwa` in config file
## Installation
You can install the theme by using git submodule or hugo module.
### Git Submodule
Add the theme as a submodule by running the following command in the
root directory of your Hugo site:
```bash
git submodule add https://github.com/tomowang/hugo-theme-tailwind.git themes/tailwind
# Or to update to the latest version
git submodule update --remote
```
### Hugo Module
1. First, initialize module for your Hugo site: `hugo mod init github.com/username/xxxx`
2. Then, add module import in your `hugo.toml`:
```toml
[module]
[[module.imports]]
path = "github.com/tomowang/hugo-theme-tailwind"
```
3. Finally, run `hugo mod get -u` to download the theme.
## Configuration
> [!IMPORTANT]
> The exampleSite's `giscus` setting uses my own profile repo.
> You **SHOULD** change it to your own repo (by using <https://giscus.app/>).
You can use the following configuration for basic usage.
```toml
baseURL = "https://example.com/"
title = "Hugo Theme Tailwind Example Site"
author = "Your Name"
copyright = "Your Name"
pagination.pagerSize = 10
languageCode = "en"
theme = "tailwind"
[markup]
_merge = "deep"
[params]
# dir name of your blog content (default is `content/posts`).
# the list of set content will show up on your index page (baseurl).
contentTypeName = "posts"
[params.header]
logo = "logo.webp"
[params.footer]
since = 2023
poweredby = true
[menu]
[[menu.main]]
identifier = "post"
name = "Post"
pageRef = "/posts"
weight = 10
[[menu.main]]
identifier = "about"
name = "About"
pageRef = "/about"
weight = 20
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
```
For advanced usage, please refer to config directory `config/_default` and
`exampleSite/config/_default`.
Some of the configuration options are:
* `markup`: goldmark and options for markdown rendering
* `params.header`: header settings (logo and sticky navbar)
* `params.footer`: footer settings (copyright years, powered by, etc.)
* `contentTypeName`: dir name of your blog content (default is `content/posts`).
* `params.taxonomies.icons`: icons for taxonomies (categories, tags, series, etc.).
* `params.giscus`: giscus settings
* `params.social_media`: social media links shown in the footer
* `params.search`: search settings
* `params.author`: author used in the JSON-LD
* `params.showAuthor`: show author name in article list and article page
* `params.jsonLD`: enable or disable JSON-LD (default disabled)
* `params.pwa`: enable or disable PWA (default disabled)
For social media link data, you can refer entries in `params.social_media.items`
(You can add more or disable existing entries in `params.social_media.items`).
```toml
[[social_media.items]]
enabled = false
title = 'Facebook'
icon = 'brand-facebook'
link = 'https://www.facebook.com/'
```
## Development
### Extend functionality
The theme folder structure is as follows:

You can extend the theme by creating following files in your site folder:
* `layouts/partials/custom_head.html`
* `layouts/partials/custom_footer.html`
### Update stylesheets
This theme use Tailwind CSS for styling. If you want to make some changes,
use `pnpm install` to install dependencies.
* Development: `pnpm dev`, this will generate css for theme users and start example site.
> `exampleSite` is fetched from https://github.com/gohugoio/hugoBasicExample
with some modifications.
### Add new icons
Search the icon in [tabler icons](https://tabler-icons.io/).
**Download** or **Copy SVG** and paste to `theme/tailwind/assets/icons/`.
Remember to remove `width="24" height="24"` in the SVG file. Use the icon file
name in your site configuration. Or if you want to update theme layout content,
you can use the following code.
```html
<i class="h-6 w-6 flex-none">
{{ partial "icon.html" "brightness-down" }}
</i>
```
## Star History
[](https://star-history.com/#tomowang/hugo-theme-tailwind&Date)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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