使用 TailwindCSS 与 DaisyUI 构建的极简 Hugo 主题
salinger-theme — Hugo 作品集模板
作者 jacksalici
Salinger 是一个基于 Hugo 的极简主题,使用 TailwindCSS 与 DaisyUI 构建,面向个人博客与作品集站点,采用 MIT 许可。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
移动优先的响应式布局
支持深色、浅色与自动三种配色模式
带自定义图标的汉堡菜单,支持 Tweemoji 表情
支持 Google Analytics 与元信息可见性自定义
仓库内含 example-site 示例站点,便于本地预览
模板详细介绍
Salinger 是一个面向个人博客与作品集的 Hugo 主题,使用 TailwindCSS 和 DaisyUI 构建,整体风格干净、极简,并以移动优先为设计取向。主题最初为作者个人网站开发,后经重写,其浅色模式首页的视觉灵感来自 J.D. 塞林格《麦田里的守望者》的 Einaudi 意大利版封面。
主题提供深色、浅色与自动三种配色模式,并带有可自定义图标的汉堡菜单;支持 Tweemoji 表情、Google Analytics 以及元信息的自定义可见性。仓库内附带 example-site 示例站点,可用于本地预览主题效果。
使用上,主题以 git submodule 方式加入 Hugo 项目,需在 hugo.toml 中配置,其中部分参数为必需项;同时依赖 npm 安装 TailwindCSS 相关依赖,因此需要 hugo、git、npm 环境。主题代码采用 MIT 许可,可免费使用、修改、商用与分发,但示例图片、字体、图标等第三方素材需单独核对其许可。仓库 README 提到 v2 大版本开发期间做过 rebase,提交历史不够整洁,从旧版本升级可能较为麻烦,建议移除子模块后重新添加。
适合你的项目吗?
适用场景
- 搭建个人博客并希望使用简洁排版风格
- 制作用于展示个人作品的作品集站点
- 需要深色/浅色模式切换的 Hugo 站点
- 以移动端阅读为主要场景的个人网站
适合人群
- 熟悉 Hugo 并愿意通过配置文件调整主题的开发者
- 需要轻量、极简视觉风格的个人站点作者
- 接受以 git submodule 与 npm 管理主题依赖的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需预先安装 hugo、git 与 npm
- 2
通过 git submodule add 将主题加入 themes/salinger
- 3
在 hugo.toml 中配置主题,部分参数为必需项,可参考 example-site 中的示例配置
- 4
在主题目录与项目根目录分别执行 npm install,并运行 hugo mod npm pack
- 5
从旧版本升级时,README 建议移除子模块后重新添加
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用该主题需预先安装 hugo、git 与 npm 环境,缺少这些工具将无法完成安装与构建。
- 主题需以 git submodule 方式加入 Hugo 项目,依赖 git 子模块机制进行安装与更新。
- hugo.toml 中部分配置参数为必需项,未正确配置会导致主题无法正常工作。
- 需在主题目录与项目根目录分别执行 npm 安装依赖,并运行 hugo mod npm pack。
- 从旧版本升级可能较麻烦,README 建议完全移除子模块后重新添加。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Please, check to have installed a recent version of _hugo_, _git_, and _npm_.
README 原文
Add the repository to your Hugo Project repository as a submodule:
README 原文
Please note that **some parameters are mandatory** for the theme to work properly.
README 原文
Install the dependencies in the theme folder and the main folder.
README 原文
https://github.com/jacksalici/salinger-theme/blob/main/LICENSEhttps://github.com/jacksalici/salinger-theme/blob/main/readme.mdIf you came from the legacy version, updating it can be a bit annoying. I suggest [removing completely](https://gist.github.com/myusuf3/7f645819ded92bda6677) the submodule and adding it again.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 77 / 100
- 技术栈
- Hugo
- 网站类型
- 作品集 · 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2024-03-24
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Hugo。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 9344973df244c67c7ac966d9e63a5be3504584e8525af81c0279705ca35af14c
2026-10-01T00:52:17.184Z
来源文件 / 仓库

 
[](https://salinger-hugo-theme.netlify.app)
# Salinger Theme 📻
> __Salinger Theme has been featured at [_HugoConf2023_](https://www.youtube.com/watch?v=PpT8JE5BbZI)!__ 🥳
___Clean and minimalistic Hugo theme built with DaisyUI and TailwindCSS.___
__Salinger__ is a _clean, minimalistic, mobile-first, blazing-fast, fancy_ and _lightweight_ theme for the [Hugo framework](https://gohugo.io).
Born as the theme for my website, recently it has been completely rebuilt using __Tailwind__ and __DaisyUI__. A demo can be seen on [the example site](https://salinger-hugo-theme.netlify.app).
Why this name? During the design of the light mode homepage, I was inspired by [the Italian edition cover by Einaudi](https://duckduckgo.com/?q=il+giovane+holden+by+j.d.+salinger+einaudi+1961&t=h_&ia=images&iax=images&iaf=color%3AWhite) of _The Catcher in The Rye_ by J.D. Salinger.

## Features 🗂️
- [x] TailwindCSS and DaisyUI 🌼 framework
- [x] Responsive and mobile-first 📲
- [x] Google Analytics 📈
- [x] Custom visibility of meta
- [x] __Dark, Auto__ and Light Mode 🌚
- [x] 2️⃣ hamburger Menu with custom icon
- [x] __Tweemoji__ Emoji support 🐧
- [x] SEO support (**100% score on PageSpeed**) 🚀
## Quick Start ⚠️
### Preview the _example site_
```shell
# prerequisites: git, hugo, and npm.
git clone https://github.com/jacksalici/salinger-theme.git salinger
cd salinger
npm install
cd example-site
hugo server -t ../..
```
A demo can also be seen on [the example site](https://salinger-hugo-theme.netlify.app).
### Install the theme
0. **Prerequisites**: Please, check to have installed a recent version of _hugo_, _git_, and _npm_.
1. Add the repository to your Hugo Project repository as a submodule:
```bash
git submodule add https://github.com/jacksalici/salinger-theme.git themes/salinger
```
2. Configure your `hugo.toml`. I suggest copying the demo file present in the __example site__ folder. Please note that **some parameters are mandatory** for the theme to work properly.
3. Install the dependencies in the theme folder and the main folder.
```bash
cd themes/salinger
npm install
cd ../..
hugo mod npm pack
npm install
```
4. You can build your site with `hugo server` and admire the result at `http://localhost:1313/`.
#### Update your installation
If you want to get the latest update of the `Salinger` theme please execute this command:
```bash
git submodule update --remote --merge
```
_Please note that during the development of the new major version (v2.x.x - Jul 23) a rebase has been made and the commit history is not so clean. If you came from the legacy version, updating it can be a bit annoying. I suggest [removing completely](https://gist.github.com/myusuf3/7f645819ded92bda6677) the submodule and adding it again._
## Usage 📐
Check out the [__wiki__](https://github.com/jacksalici/salinger-theme/wiki) and the _example site_.
## License 📜
The Salinger theme code is licensed under the [MIT license](https://github.com/jacksalici/salinger-theme/blob/master/LICENSE).
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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