npx skills add https://github.com/jackspace/claudeskillz --skill hugo状态:生产就绪 最后更新:2025-11-04 依赖项:无(Hugo 是独立的二进制文件) 最新版本:hugo@0.152.2+extended, PaperMod@latest, Sveltia CMS@latest
关键:除非你确定不需要 SCSS/Sass 支持,否则始终安装 Hugo Extended 版本(而不是 Standard 标准版)。大多数主题都需要 Extended 版本。
# macOS
brew install hugo
# Linux (Ubuntu/Debian)
wget https://github.com/gohugoio/hugo/releases/download/v0.152.2/hugo_extended_0.152.2_linux-amd64.deb
sudo dpkg -i hugo_extended_0.152.2_linux-amd64.deb
# 验证 Extended 版本
hugo version # 应显示 "+extended"
为何重要:
# 使用 YAML 格式(而非 TOML)以获得更好的 CMS 兼容性
hugo new site my-blog --format yaml
# 初始化 Git
cd my-blog
git init
# 添加 PaperMod 主题(博客推荐)
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
关键:
--format yaml 创建 hugo.yaml(而非 hugo.toml)--recursive 标志# hugo.yaml - 最小工作配置
baseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
enableRobotsTXT: true
params:
ShowReadingTime: true
ShowShareButtons: true
defaultTheme: auto # 支持 暗色/亮色/自动
# 创建第一篇文章
hugo new content posts/first-post.md
# 运行开发服务器(带实时重载)
hugo server
# 为生产环境构建
hugo --minify
# 输出在 public/ 目录中
使用以下方法之一安装 Hugo Extended:
方法 1:Homebrew (macOS/Linux) ✅ 推荐
brew install hugo
方法 2:二进制下载 (Linux)
# 检查最新版本:https://github.com/gohugoio/hugo/releases
VERSION="0.152.2"
wget https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_linux-amd64.deb
sudo dpkg -i hugo_extended_${VERSION}_linux-amd64.deb
方法 3:Docker
docker run --rm -it -v $(pwd):/src klakegg/hugo:ext-alpine
方法 4:NPM 包装器(不推荐,可能落后于官方版本)
npm install -g hugo-bin
验证:
hugo version
# 应输出:hugo v0.152.2+extended
# ^^^^^^^^ 必须显示 "+extended"
关键点:
使用 YAML 配置创建新站点:
hugo new site my-site --format yaml
cd my-site
创建的目录结构:
my-site/
├── hugo.yaml # 配置(YAML 格式)
├── archetypes/ # 内容模板
│ └── default.md
├── content/ # 所有内容放在这里
├── data/ # 数据文件(JSON/YAML/TOML)
├── layouts/ # 模板覆盖
├── static/ # 静态资源(图片、CSS、JS)
├── themes/ # 主题目录
└── public/ # 构建输出(生成,git 忽略)
关键:
--format yaml 以获得 CMS 兼容性public/ 目录提交到 Git.gitignore(见步骤 3)推荐方法:Git 子模块 ✅
# 流行主题:
# - PaperMod (博客):https://github.com/adityatelange/hugo-PaperMod
# - Book (文档):https://github.com/alex-shpak/hugo-book
# - Academic (研究):https://github.com/HugoBlox/theme-academic-cv
# - Ananke (通用):https://github.com/theNewDynamic/gohugo-theme-ananke
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
替代方案:Hugo 模块(高级)
hugo mod init github.com/username/my-site
# 在 hugo.yaml 中:
# module:
# imports:
# - path: github.com/adityatelange/hugo-PaperMod
将主题添加到 hugo.yaml:
theme: "PaperMod"
克隆带有子模块的项目时:
git clone --recursive https://github.com/username/my-site.git
# 或者如果已经克隆:
git submodule update --init --recursive
关键点:
--depth=1 节省空间(不包含主题历史记录)git submodule update --init --recursivehugo.yaml - 完整示例(PaperMod 博客):
baseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
defaultContentLanguage: "en"
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
enableEmoji: true
minify:
disableXML: true
minifyOutput: true
params:
env: production
title: "My Hugo Blog"
description: "A blog built with Hugo and PaperMod"
author: "Your Name"
ShowReadingTime: true
ShowShareButtons: true
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
defaultTheme: auto # dark, light, auto
socialIcons:
- name: twitter
url: "https://twitter.com/username"
- name: github
url: "https://github.com/username"
menu:
main:
- identifier: posts
name: Posts
url: /posts/
weight: 10
- identifier: about
name: About
url: /about/
weight: 20
outputs:
home:
- HTML
- RSS
- JSON # 搜索所需
配置格式:
hugo.yaml - 更好的 CMS 兼容性hugo.toml - 默认,但在 Sveltia CMS 中有问题hugo.json - 很少使用环境特定配置:
config/
├── _default/
│ └── hugo.yaml
├── production/
│ └── hugo.yaml # 生产环境覆盖配置
└── development/
└── hugo.yaml # 本地开发覆盖配置
使用 Hugo CLI 创建内容:
# 博客文章
hugo new content posts/my-first-post.md
# 页面
hugo new content about.md
# 嵌套文档
hugo new content docs/getting-started/installation.md
Frontmatter 格式(推荐 YAML):
---
title: "My First Post"
date: 2025-11-04T10:00:00+11:00
draft: false
tags: ["hugo", "blog"]
categories: ["General"]
description: "A brief description for SEO"
cover:
image: "/images/cover.jpg"
alt: "Cover image"
---
# 文章内容从这里开始
This is my first Hugo blog post!
TOML Frontmatter(仅作参考):
+++
title = "My First Post"
date = 2025-11-04T10:00:00+11:00
draft = false
tags = ["hugo", "blog"]
+++
关键点:
--- 作为 YAML frontmatter 的分隔符+++ 作为 TOML frontmatter 的分隔符draft: false 是文章出现在生产环境所必需的date 在未来 = 文章不会发布(除非使用 --buildFuture 标志)开发服务器(带实时重载):
# 启动服务器
hugo server
# 显示草稿
hugo server --buildDrafts
# 显示未来日期的文章
hugo server --buildFuture
# 绑定到特定端口
hugo server --port 1314
# 访问地址:http://localhost:1313
生产环境构建:
# 基本构建
hugo
# 带压缩(推荐)
hugo --minify
# 带特定 baseURL(用于部署)
hugo --minify --baseURL https://example.com
# 或使用环境变量
hugo --minify -b $CF_PAGES_URL
构建输出:
public/ 目录中关键点:
--minifypublic/ 目录创建 wrangler.jsonc:
{
"name": "my-hugo-site",
"compatibility_date": "2025-01-29",
"assets": {
"directory": "./public",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
手动部署:
# 构建站点
hugo --minify
# 部署到 Workers
npx wrangler deploy
GitHub Actions(自动化):
创建 .github/workflows/deploy.yml:
name: Deploy to Cloudflare Workers
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # 主题子模块很重要!
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.152.2'
extended: true
- name: Build
run: hugo --minify
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
关键点:
assets.directory 必须是 "./public"(Hugo 的输出目录)html_handling: "auto-trailing-slash" 处理 Hugo 的 URL 结构not_found_handling: "404-page" 提供 Hugo 的 404.htmlsubmodules: recursive✅ 安装 Hugo Extended(而非 Standard) - 主题的 SCSS/Sass 支持所必需
✅ 使用 YAML 配置(--format yaml) - 比 TOML 具有更好的 CMS 兼容性
✅ 将主题添加为 Git 子模块 - 更易于更新和版本控制
✅ 设置正确的 baseURL - 防止部署时资源链接损坏
✅ 在 CI/CD 中固定 Hugo 版本 - 防止本地和部署环境之间的版本不匹配错误
✅ 将 public/ 添加到 .gitignore - 构建输出不应提交
✅ 使用 draft: false - 草稿不会出现在生产环境构建中
✅ 使用 --recursive 标志克隆 - 确保获取主题子模块
✅ 对图片使用相对路径 - /images/photo.jpg 而非 ../images/photo.jpg
✅ 部署前测试构建 - 使用 hugo --minify 在本地捕获错误
❌ 不要安装 Hugo Standard - 大多数主题需要 Extended 版本
❌ 不要将 TOML 配置与 Sveltia CMS 一起使用 - 存在已知错误,请使用 YAML
❌ 不要提交 public/ 目录 - 它是生成的输出,不是源代码
❌ 不要使用不同的 Hugo 版本 - 本地与 CI/CD 版本不匹配会导致错误
❌ 不要忘记 submodules: recursive - 主题在 CI/CD 中无法加载
❌ 不要硬编码生产环境 URL - 使用 -b $CF_PAGES_URL 或环境配置
❌ 不要推送 resources/_gen/ - 生成的资源,应放在 .gitignore 中
❌ 不要随意使用未来日期 - 文章在日期过去之前不会发布
❌ 不要跳过 .hugo_build.lock - 添加到 .gitignore
❌ 不要混合使用 YAML 和 TOML - 在整个项目中坚持使用一种格式
此技能可预防 9 个已记录的问题:
错误:Error: SCSS support not enabled
来源:https://gohugo.io/troubleshooting/faq/#i-get-this-feature-is-not-available-in-your-current-hugo-version
发生原因:主题需要 SCSS/Sass 处理,但 Hugo Standard 不包含此功能
预防:始终安装 Hugo Extended 版本。使用 hugo version | grep extended 验证
错误:CSS/JS/图片链接损坏,所有资源 404
来源:Hugo 文档,Cloudflare Pages 指南
发生原因:配置中的 baseURL 与部署 URL 不匹配
预防:
config/production/hugo.yaml)hugo -b $CF_PAGES_URL错误:Sveltia CMS 无法解析 frontmatter,配置未加载
来源:Sveltia CMS 文档,社区报告
发生原因:混合使用 TOML 和 YAML,或将 TOML 与 Sveltia CMS 一起使用(存在错误)
预防:标准化使用 YAML 格式。使用 --format yaml 标志创建站点
错误:功能在本地有效但在 CI/CD 中失败,反之亦然 来源:GitHub Actions hugo-setup,Cloudflare Pages 文档 发生原因:不同的 Hugo 版本具有不同的功能/错误 预防:
hugo.yaml 元数据或 README 中固定 Hugo 版本HUGO_VERSIONhugo-version: '0.152.2'错误:内容文件未渲染,构建因解析错误而失败
来源:Hugo 内容管理文档
发生原因:错误的分隔符(--- 与 +++),无效的 YAML/TOML 语法
预防:
--- 分隔符+++ 分隔符错误:Error: module "PaperMod" not found,空白站点
来源:Hugo 主题文档
发生原因:主题未安装,或配置中未设置 theme,或 Git 子模块未初始化
预防:
theme: "PaperMod"git submodule add 安装主题git submodule update --init --recursive错误:部署站点上内容缺失但在本地可见
来源:Hugo 日期处理文档
发生原因:未来日期的文章在本地发布(使用 --buildFuture)但未在生产环境发布
预防:
--buildFuture 标志date 字段错误:站点上内容过时,public/ 中存在 Git 冲突
来源:Hugo 项目结构最佳实践
发生原因:提交了 public/ 目录,而它应该只是构建输出
预防:
public/ 添加到 .gitignore错误:failed to extract shortcode,模块缓存损坏
来源:Hugo 模块文档,GitHub 问题
发生原因:损坏的 Hugo 模块缓存(当使用模块而非子模块时)
预防:
hugo mod clean 清除缓存hugo mod tidybaseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
defaultContentLanguage: "en"
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
enableEmoji: true
pygmentsUseClasses: true
summaryLength: 30
minify:
disableXML: true
minifyOutput: true
params:
env: production
title: "My Hugo Blog"
description: "A blog built with Hugo and PaperMod"
keywords: [Blog, Hugo, Tech]
author: "Your Name"
images: ["/images/og-image.jpg"]
DateFormat: "January 2, 2006"
defaultTheme: auto # dark, light, auto
disableThemeToggle: false
ShowReadingTime: true
ShowShareButtons: true
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
disableSpecial1stPost: false
disableScrollToTop: false
comments: false
hidemeta: false
hideSummary: false
showtoc: true
tocopen: false
assets:
disableHLJS: true
disableFingerprinting: false
label:
text: "My Hugo Blog"
icon: /favicon.ico
iconHeight: 35
homeInfoParams:
Title: "Hi there 👋"
Content: Welcome to my blog.
socialIcons:
- name: twitter
url: "https://twitter.com/"
- name: github
url: "https://github.com/"
- name: linkedin
url: "https://linkedin.com/"
- name: rss
url: "/index.xml"
cover:
hidden: false
hiddenInList: false
hiddenInSingle: false
editPost:
URL: "https://github.com/username/repo/tree/main/content"
Text: "Suggest Changes"
appendFilePath: true
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]
menu:
main:
- identifier: search
name: Search
url: /search/
weight: 10
- identifier: posts
name: Posts
url: /posts/
weight: 20
- identifier: archives
name: Archives
url: /archives/
weight: 30
- identifier: tags
name: Tags
url: /tags/
weight: 40
- identifier: about
name: About
url: /about/
weight: 50
outputs:
home:
- HTML
- RSS
- JSON # 搜索功能所需
为何使用这些设置:
buildDrafts: false - 防止草稿出现在生产环境enableRobotsTXT: true - SEO 最佳实践minifyOutput: true - 更小的文件大小defaultTheme: auto - 尊重用户的系统偏好JSON 输出 - 启用客户端搜索{
"name": "my-hugo-site",
"compatibility_date": "2025-01-29",
"assets": {
"directory": "./public",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
为何使用这些设置:
directory: "./public" - Hugo 的构建输出html_handling: "auto-trailing-slash" - 匹配 Hugo 的 URL 结构not_found_handling: "404-page" - 提供 Hugo 的自定义 404.html# Hugo
/public/
/resources/_gen/
.hugo_build.lock
# OS
.DS_Store
Thumbs.db
# Editor
.vscode/
.idea/
*.swp
*.swo
# Dependencies (if using npm for tools)
node_modules/
package-lock.json
# Logs
*.log
✅ Hugo 是 Sveltia 的主要用例 - 专门为 Hugo 设计 ✅ 简单设置 - 2 个静态文件,无需构建步骤 ✅ 无 npm 依赖 - 单个 CDN 脚本 ✅ 本地后端 - 无需 Git 即可在本地测试 CMS ✅ YAML frontmatter - 完全兼容 ✅ 无安全漏洞 - 轻量级,维护良好 ✅ 积极开发 - 专注于静态网站生成器
1. 创建管理界面 - static/admin/index.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Content Manager</title>
</head>
<body>
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js" type="module"></script>
</body>
</html>
2. 创建 CMS 配置 - static/admin/config.yml:
backend:
name: git-gateway
branch: main
local_backend: true # 启用本地测试
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
collections:
- name: "blog"
label: "Blog Posts"
folder: "content/posts"
create: true
slug: "{{slug}}"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Description", name: "description", widget: "string", required: false}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Categories", name: "categories", widget: "list", required: false}
- {label: "Cover Image", name: "cover", widget: "object", required: false, fields: [
{label: "Image", name: "image", widget: "image", required: false},
{label: "Alt Text", name: "alt", widget: "string", required: false}
]}
- {label: "Body", name: "body", widget: "markdown"}
- name: "pages"
label: "Pages"
folder: "content"
create: true
slug: "{{slug}}"
filter: {field: "type", value: "page"}
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Type", name: "type", widget: "hidden", default: "page"}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Body", name: "body", widget: "markdown"}
3. 重建站点:
hugo
# 管理界面现在位于:http://localhost:1313/admin
4. 生产环境 OAuth(用于 Git 后端):
Sveltia CMS 在生产环境中需要 OAuth 进行 GitHub/GitLab 身份验证。使用 Cloudflare Workers 作为 OAuth 代理:
参见捆绑的参考文档:references/sveltia-integration-guide.md
/admin 访问管理界面local_backend: true 允许无需 Git 进行本地测试static/images/uploads⚠️ 请改用 Sveltia CMS。TinaCMS 对于 Hugo 有显著限制:
❌ 仅限 React 的可视化编辑 - Hugo 使用 Go 模板,可视化编辑无法工作 ❌ 复杂设置 - 需要 Node.js 服务器或 Tina Cloud ❌ 692 个 npm 包 - 对比 Sveltia 的 1 个 CDN 脚本 ❌ 7 个安全漏洞 - (截至 2025-11-04,4 个高危,3 个严重) ❌ 专注于 React/Next.js - Hugo 是次要用例 ❌ 仅限 YAML - 与 Sveltia 相同的限制,但没有好处
仅在以下情况下考虑 TinaCMS:
参见捆绑的参考文档:references/tinacms-integration-guide.md(警告:不推荐)
Hugo 通过 Hugo Pipes 和 Tailwind CLI 支持 Tailwind CSS v4。这种方法与基于 Vite 的 React 项目有根本不同。
在 Hugo 中使用 Tailwind 当:
使用主题(PaperMod、Book 等)当:
关键: 请不要尝试将 tailwind-v4-shadcn 技能模式用于 Hugo。该技能适用于 Vite + React 项目,与 Hugo 的资源管道不兼容。
| 方面 | Vite + React | Hugo |
|---|---|---|
| 构建系统 | JavaScript (Node.js) | Go (Hugo 二进制文件) |
| Tailwind 集成 | @tailwindcss/vite 插件 | Tailwind CLI + PostCSS |
| 配置文件 | vite.config.ts | hugo.yaml |
| 内容扫描 | content: [] 通配符 | hugo_stats.json |
| 开发服务器 | Vite (端口 5173) | Hugo (端口 1313) |
| 暗色模式 | React ThemeProvider | CSS 类或 Alpine.js |
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
hugo.yaml)build:
writeStats: true # 为 Tailwind 生成 hugo_stats.json
module:
mounts:
- source: assets
target: assets
- source: hugo_stats.json
target: assets/watching/hugo_stats.json
tailwind.config.js)module.exports = {
content: [
'./hugo_stats.json',
'./layouts/**/*.html',
'./content/**/*.{html,md}',
],
darkMode: 'class',
theme: {
extend: {
colors: {
primary: '#0066cc',
},
},
},
plugins: [],
}
postcss.config.js)module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
assets/css/main.css)@import "tailwindcss";
@layer base {
body {
@apply bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100;
}
}
layouts/_default/baseof.html)<head>
{{ $style := resources.Get "css/main.css" | resources.PostCSS }}
{{ if hugo.IsProduction }}
{{ $style = $style | minify | fingerprint }}
{{ end }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>
hugo server
完整的 Tailwind v4 + Hugo 设置包括:
参见捆绑资源:
references/tailwind-v4-integration.md(综合文档)templates/hugo-tailwind-minimal/(起点)templates/hugo-tailwind-blog/(使用 Tailwind 的完整博客)在 Hugo 中使用 Tailwind 时的常见问题(所有问题及解决方案均在参考指南中记录):
| 问题 | 原因 | 解决方案 |
|---|---|---|
| CSS 未处理 | PostCSS 未配置 | 在模板中验证 resources.PostCSS |
| 类未清除 | hugo_stats.json 未生成 | 在 hugo.yaml 中启用 writeStats: true |
| 暗色模式损坏 | 配置错误 | 在 tailwind.config.js 中使用 darkMode: 'class' |
| 资源指纹生成失败 | Hugo Pipes 使用不正确 | 使用 RelPermalink 而非 Permalink |
| CSS 中的 Hugo 模板语法 | 无法在 CSS 中使用 {{ }} | 在模板中应用类,而非 CSS |
| 版本不匹配 | CLI 与 PostCSS 插件 | 将所有更新到相同版本 |
# 脚手架
hugo new site my-blog --format yaml
cd my-blog
git init
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
# 配置(见上面的 hugo.yaml 示例)
# 创建文章
hugo new content posts/first-post.md
# 开发
hugo server
# 构建
hugo --minify
何时使用:个人博客、公司博客、新闻网站
# 脚手架
hugo new site docs --format yaml
cd docs
git init
git submodule add https://github.com/alex-shpak/hugo-book.git themes/hugo-book
# 为文档配置(嵌套导航、搜索)
# 参见:捆绑模板 `templates/hugo-docs/`
# 创建文档
hugo new content docs/getting-started/installation.md
# 构建
hugo --minify
何时使用:技术文档、知识库、API 文档
# 脚手架
hugo new site landing --format yaml
# 使用自定义布局(无主题)
# 参见:捆绑模板 `templates/hugo-landing/`
# 单页结构
hugo new content _index.md
# 构建
hugo --minify
何时使用:营销网站、产品页面、作品集
# hugo.yaml
defaultContentLanguage: "en"
languages:
en:
languageName: "English"
weight: 1
es:
languageName: "Español"
weight: 2
#
Status : Production Ready Last Updated : 2025-11-04 Dependencies : None (Hugo is a standalone binary) Latest Versions : hugo@0.152.2+extended, PaperMod@latest, Sveltia CMS@latest
CRITICAL : Always install Hugo Extended edition (not Standard) unless you're certain you don't need SCSS/Sass support. Most themes require Extended.
# macOS
brew install hugo
# Linux (Ubuntu/Debian)
wget https://github.com/gohugoio/hugo/releases/download/v0.152.2/hugo_extended_0.152.2_linux-amd64.deb
sudo dpkg -i hugo_extended_0.152.2_linux-amd64.deb
# Verify Extended edition
hugo version # Should show "+extended"
Why this matters:
# Use YAML format (not TOML) for better CMS compatibility
hugo new site my-blog --format yaml
# Initialize Git
cd my-blog
git init
# Add PaperMod theme (recommended for blogs)
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
CRITICAL:
--format yaml to create hugo.yaml (not hugo.toml)--recursive flag when cloning later# hugo.yaml - Minimal working configuration
baseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
enableRobotsTXT: true
params:
ShowReadingTime: true
ShowShareButtons: true
defaultTheme: auto # Supports dark/light/auto
# Create first post
hugo new content posts/first-post.md
# Run development server (with live reload)
hugo server
# Build for production
hugo --minify
# Output is in public/ directory
Install Hugo Extended using one of these methods:
Method 1: Homebrew (macOS/Linux) ✅ Recommended
brew install hugo
Method 2: Binary Download (Linux)
# Check latest version: https://github.com/gohugoio/hugo/releases
VERSION="0.152.2"
wget https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_linux-amd64.deb
sudo dpkg -i hugo_extended_${VERSION}_linux-amd64.deb
Method 3: Docker
docker run --rm -it -v $(pwd):/src klakegg/hugo:ext-alpine
Method 4: NPM Wrapper (not recommended, may lag behind)
npm install -g hugo-bin
Verification:
hugo version
# Should output: hugo v0.152.2+extended
# ^^^^^^^^ Must show "+extended"
Key Points:
Create new site with YAML configuration:
hugo new site my-site --format yaml
cd my-site
Directory structure created:
my-site/
├── hugo.yaml # Configuration (YAML format)
├── archetypes/ # Content templates
│ └── default.md
├── content/ # All your content goes here
├── data/ # Data files (JSON/YAML/TOML)
├── layouts/ # Template overrides
├── static/ # Static assets (images, CSS, JS)
├── themes/ # Themes directory
└── public/ # Build output (generated, git ignore)
CRITICAL:
--format yaml for CMS compatibilitypublic/ directory to Git.gitignore immediately (see Step 3)Recommended Method: Git Submodule ✅
# Popular themes:
# - PaperMod (blogs): https://github.com/adityatelange/hugo-PaperMod
# - Book (docs): https://github.com/alex-shpak/hugo-book
# - Academic (research): https://github.com/HugoBlox/theme-academic-cv
# - Ananke (general): https://github.com/theNewDynamic/gohugo-theme-ananke
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
Alternative: Hugo Modules (advanced)
hugo mod init github.com/username/my-site
# In hugo.yaml:
# module:
# imports:
# - path: github.com/adityatelange/hugo-PaperMod
Add theme to hugo.yaml:
theme: "PaperMod"
When cloning project with submodules:
git clone --recursive https://github.com/username/my-site.git
# Or if already cloned:
git submodule update --init --recursive
Key Points:
--depth=1 saves space (no theme history)git submodule update --init --recursive after clonehugo.yaml - Complete Example (PaperMod blog):
baseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
defaultContentLanguage: "en"
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
enableEmoji: true
minify:
disableXML: true
minifyOutput: true
params:
env: production
title: "My Hugo Blog"
description: "A blog built with Hugo and PaperMod"
author: "Your Name"
ShowReadingTime: true
ShowShareButtons: true
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
defaultTheme: auto # dark, light, auto
socialIcons:
- name: twitter
url: "https://twitter.com/username"
- name: github
url: "https://github.com/username"
menu:
main:
- identifier: posts
name: Posts
url: /posts/
weight: 10
- identifier: about
name: About
url: /about/
weight: 20
outputs:
home:
- HTML
- RSS
- JSON # Required for search
Configuration Formats:
hugo.yaml - Better CMS compatibilityhugo.toml - Default but problematic with Sveltia CMShugo.json - Rarely usedEnvironment-Specific Configs:
config/
├── _default/
│ └── hugo.yaml
├── production/
│ └── hugo.yaml # Overrides for production
└── development/
└── hugo.yaml # Overrides for local dev
Create content with Hugo CLI:
# Blog post
hugo new content posts/my-first-post.md
# Page
hugo new content about.md
# Nested documentation
hugo new content docs/getting-started/installation.md
Frontmatter Format (YAML recommended):
---
title: "My First Post"
date: 2025-11-04T10:00:00+11:00
draft: false
tags: ["hugo", "blog"]
categories: ["General"]
description: "A brief description for SEO"
cover:
image: "/images/cover.jpg"
alt: "Cover image"
---
# Post content starts here
This is my first Hugo blog post!
TOML Frontmatter (for reference only):
+++
title = "My First Post"
date = 2025-11-04T10:00:00+11:00
draft = false
tags = ["hugo", "blog"]
+++
Key Points:
--- delimiters for YAML frontmatter+++ delimiters for TOML frontmatterdraft: false required for post to appear in productiondate in future = post won't publish (unless --buildFuture flag used)Development server (with live reload):
# Start server
hugo server
# With drafts visible
hugo server --buildDrafts
# With future-dated posts
hugo server --buildFuture
# Bind to specific port
hugo server --port 1314
# Access at: http://localhost:1313
Production build:
# Basic build
hugo
# With minification (recommended)
hugo --minify
# With specific baseURL (for deployment)
hugo --minify --baseURL https://example.com
# Or use environment variable
hugo --minify -b $CF_PAGES_URL
Build Output:
public/ directoryKey Points:
--minifypublic/ directoryCreate wrangler.jsonc:
{
"name": "my-hugo-site",
"compatibility_date": "2025-01-29",
"assets": {
"directory": "./public",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
Manual deployment:
# Build site
hugo --minify
# Deploy to Workers
npx wrangler deploy
GitHub Actions (Automated):
Create .github/workflows/deploy.yml:
name: Deploy to Cloudflare Workers
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Important for theme submodules!
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.152.2'
extended: true
- name: Build
run: hugo --minify
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Key Points:
assets.directory must be "./public" (Hugo's output)html_handling: "auto-trailing-slash" handles Hugo's URL structurenot_found_handling: "404-page" serves Hugo's 404.htmlsubmodules: recursive for theme submodules✅ Install Hugo Extended (not Standard) - required for SCSS/Sass support in themes ✅ Use YAML configuration (--format yaml) - better CMS compatibility than TOML ✅ Add themes as Git submodules - easier updates and version control ✅ Set correct baseURL - prevents broken asset links on deployment ✅ Pin Hugo version in CI/CD - prevents version mismatch errors between local and deployment ✅ Addpublic/ to .gitignore - build output should not be committed ✅ Usedraft: false - drafts don't appear in production builds ✅ Clone with--recursive flag - ensures theme submodules are fetched ✅ Use relative paths for images - /images/photo.jpg not ../images/photo.jpg ✅ Test build before deploying - catch errors locally with hugo --minify
❌ Don't install Hugo Standard - most themes require Extended edition ❌ Don't use TOML config with Sveltia CMS - has known bugs, use YAML instead ❌ Don't commitpublic/ directory - it's generated output, not source code ❌ Don't use different Hugo versions - local vs CI/CD version mismatch causes errors ❌ Don't forgetsubmodules: recursive - themes won't load in CI/CD ❌ Don't hardcode production URLs - use -b $CF_PAGES_URL or environment configs ❌ Don't pushresources/_gen/ - generated assets, should be in .gitignore ❌ Don't use future dates carelessly - posts won't publish until date passes ❌ Don't skip.hugo_build.lock - add to .gitignore ❌ Don't mix YAML and TOML - stick to one format throughout project
This skill prevents 9 documented issues:
Error : Error: SCSS support not enabled Source : https://gohugo.io/troubleshooting/faq/#i-get-this-feature-is-not-available-in-your-current-hugo-version Why It Happens : Theme requires SCSS/Sass processing, but Hugo Standard doesn't include it Prevention : Always install Hugo Extended edition. Verify with hugo version | grep extended
Error : Broken CSS/JS/image links, 404s on all assets Source : Hugo docs, Cloudflare Pages guide Why It Happens : baseURL in config doesn't match deployment URL Prevention :
config/production/hugo.yaml)hugo -b $CF_PAGES_URLError : Sveltia CMS fails to parse frontmatter, config not loading Source : Sveltia CMS documentation, community reports Why It Happens : Mixing TOML and YAML, or using TOML with Sveltia CMS (which has bugs) Prevention : Standardize on YAML format. Create sites with --format yaml flag
Error : Features work locally but fail in CI/CD, or vice versa Source : GitHub Actions hugo-setup, Cloudflare Pages docs Why It Happens : Different Hugo versions have different features/bugs Prevention :
hugo.yaml metadata or READMEHUGO_VERSION in Cloudflare Pageshugo-version: '0.152.2' in GitHub ActionsError : Content files don't render, build fails with parse errors Source : Hugo content management documentation Why It Happens : Wrong delimiters (--- vs +++), invalid YAML/TOML syntax Prevention :
--- delimiters+++ delimitersError : Error: module "PaperMod" not found, blank site Source : Hugo themes documentation Why It Happens : Theme not installed, or theme not set in config, or Git submodules not initialized Prevention :
theme: "PaperMod" in hugo.yamlgit submodule add for theme installationgit submodule update --init --recursive after cloneError : Content missing on deployed site but visible locally Source : Hugo date handling documentation Why It Happens : Future-dated posts published locally (with --buildFuture) but not in production Prevention :
--buildFuture flag to production builddate field in frontmatterError : Stale content on site, Git conflicts in public/ Source : Hugo project structure best practices Why It Happens : Committing public/ directory when it should be build output only Prevention :
public/ to .gitignoreError : failed to extract shortcode, corrupted module cache Source : Hugo modules documentation, GitHub issues Why It Happens : Corrupted Hugo Modules cache (when using modules instead of submodules) Prevention :
hugo mod clean to clear cachehugo mod tidy periodicallybaseURL: "https://example.com/"
title: "My Hugo Blog"
theme: "PaperMod"
languageCode: "en-us"
defaultContentLanguage: "en"
enableRobotsTXT: true
buildDrafts: false
buildFuture: false
buildExpired: false
enableEmoji: true
pygmentsUseClasses: true
summaryLength: 30
minify:
disableXML: true
minifyOutput: true
params:
env: production
title: "My Hugo Blog"
description: "A blog built with Hugo and PaperMod"
keywords: [Blog, Hugo, Tech]
author: "Your Name"
images: ["/images/og-image.jpg"]
DateFormat: "January 2, 2006"
defaultTheme: auto # dark, light, auto
disableThemeToggle: false
ShowReadingTime: true
ShowShareButtons: true
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
disableSpecial1stPost: false
disableScrollToTop: false
comments: false
hidemeta: false
hideSummary: false
showtoc: true
tocopen: false
assets:
disableHLJS: true
disableFingerprinting: false
label:
text: "My Hugo Blog"
icon: /favicon.ico
iconHeight: 35
homeInfoParams:
Title: "Hi there 👋"
Content: Welcome to my blog.
socialIcons:
- name: twitter
url: "https://twitter.com/"
- name: github
url: "https://github.com/"
- name: linkedin
url: "https://linkedin.com/"
- name: rss
url: "/index.xml"
cover:
hidden: false
hiddenInList: false
hiddenInSingle: false
editPost:
URL: "https://github.com/username/repo/tree/main/content"
Text: "Suggest Changes"
appendFilePath: true
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]
menu:
main:
- identifier: search
name: Search
url: /search/
weight: 10
- identifier: posts
name: Posts
url: /posts/
weight: 20
- identifier: archives
name: Archives
url: /archives/
weight: 30
- identifier: tags
name: Tags
url: /tags/
weight: 40
- identifier: about
name: About
url: /about/
weight: 50
outputs:
home:
- HTML
- RSS
- JSON # Required for search functionality
Why these settings:
buildDrafts: false - prevents drafts in productionenableRobotsTXT: true - SEO best practiceminifyOutput: true - smaller file sizesdefaultTheme: auto - respects user's system preferenceJSON output - enables client-side search{
"name": "my-hugo-site",
"compatibility_date": "2025-01-29",
"assets": {
"directory": "./public",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
Why these settings:
directory: "./public" - Hugo's build outputhtml_handling: "auto-trailing-slash" - matches Hugo's URL structurenot_found_handling: "404-page" - serves Hugo's custom 404.html# Hugo
/public/
/resources/_gen/
.hugo_build.lock
# OS
.DS_Store
Thumbs.db
# Editor
.vscode/
.idea/
*.swp
*.swo
# Dependencies (if using npm for tools)
node_modules/
package-lock.json
# Logs
*.log
✅ Hugo is Sveltia's primary use case - designed specifically for Hugo ✅ Simple setup - 2 static files, no build step required ✅ No npm dependencies - single CDN script ✅ Local backend - test CMS locally without Git ✅ YAML frontmatter - fully compatible ✅ No security vulnerabilities - lightweight, maintained ✅ Active development - focused on static site generators
1. Create admin interface - static/admin/index.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Content Manager</title>
</head>
<body>
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js" type="module"></script>
</body>
</html>
2. Create CMS config - static/admin/config.yml:
backend:
name: git-gateway
branch: main
local_backend: true # Enable local testing
media_folder: "static/images/uploads"
public_folder: "/images/uploads"
collections:
- name: "blog"
label: "Blog Posts"
folder: "content/posts"
create: true
slug: "{{slug}}"
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Description", name: "description", widget: "string", required: false}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Categories", name: "categories", widget: "list", required: false}
- {label: "Cover Image", name: "cover", widget: "object", required: false, fields: [
{label: "Image", name: "image", widget: "image", required: false},
{label: "Alt Text", name: "alt", widget: "string", required: false}
]}
- {label: "Body", name: "body", widget: "markdown"}
- name: "pages"
label: "Pages"
folder: "content"
create: true
slug: "{{slug}}"
filter: {field: "type", value: "page"}
fields:
- {label: "Title", name: "title", widget: "string"}
- {label: "Date", name: "date", widget: "datetime"}
- {label: "Type", name: "type", widget: "hidden", default: "page"}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Body", name: "body", widget: "markdown"}
3. Rebuild site :
hugo
# Admin interface now at: http://localhost:1313/admin
4. Production OAuth (for Git backend):
Sveltia CMS needs OAuth for GitHub/GitLab authentication in production. Use Cloudflare Workers for OAuth proxy:
See bundled reference: references/sveltia-integration-guide.md
/admin after buildlocal_backend: true allows local testing without Gitstatic/images/uploads⚠️ Use Sveltia CMS instead. TinaCMS has significant limitations for Hugo:
❌ React-only visual editing - Hugo is Go-templated, visual editing won't work ❌ Complex setup - requires Node.js server or Tina Cloud ❌ 692 npm packages - vs Sveltia's 1 CDN script ❌ 7 security vulnerabilities - (4 high, 3 critical as of 2025-11-04) ❌ React/Next.js focused - Hugo is secondary use case ❌ YAML only - same limitation as Sveltia, without benefits
Only consider TinaCMS if:
See bundled reference: references/tinacms-integration-guide.md (warning: not recommended)
Hugo supports Tailwind CSS v4 through Hugo Pipes and the Tailwind CLI. This approach is fundamentally different from Vite-based React projects.
Use Tailwind with Hugo when:
Use themes (PaperMod, Book, etc.) when:
CRITICAL: Do NOT try to use the tailwind-v4-shadcn skill patterns with Hugo. That skill is for Vite + React projects and is incompatible with Hugo's asset pipeline.
| Aspect | Vite + React | Hugo |
|---|---|---|
| Build System | JavaScript (Node.js) | Go (Hugo binary) |
| Tailwind Integration | @tailwindcss/vite plugin | Tailwind CLI + PostCSS |
| Config File | vite.config.ts | hugo.yaml |
| Content Scanning | content: [] globs | hugo_stats.json |
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
2. Configure Hugo (hugo.yaml)
build:
writeStats: true # Generates hugo_stats.json for Tailwind
module:
mounts:
- source: assets
target: assets
- source: hugo_stats.json
target: assets/watching/hugo_stats.json
3. Configure Tailwind (tailwind.config.js)
module.exports = {
content: [
'./hugo_stats.json',
'./layouts/**/*.html',
'./content/**/*.{html,md}',
],
darkMode: 'class',
theme: {
extend: {
colors: {
primary: '#0066cc',
},
},
},
plugins: [],
}
4. Configure PostCSS (postcss.config.js)
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
5. Create CSS Entry File (assets/css/main.css)
@import "tailwindcss";
@layer base {
body {
@apply bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100;
}
}
6. Process CSS in Template (layouts/_default/baseof.html)
<head>
{{ $style := resources.Get "css/main.css" | resources.PostCSS }}
{{ if hugo.IsProduction }}
{{ $style = $style | minify | fingerprint }}
{{ end }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>
7. Start Development
hugo server
For full Tailwind v4 + Hugo setup including:
See bundled resources:
references/tailwind-v4-integration.md (comprehensive documentation)templates/hugo-tailwind-minimal/ (starting point)templates/hugo-tailwind-blog/ (complete blog with Tailwind)Common issues when using Tailwind with Hugo (all documented with solutions in reference guide):
| Issue | Cause | Solution |
|---|---|---|
| CSS not processing | PostCSS not configured | Verify resources.PostCSS in template |
| Classes not purging | hugo_stats.json not generated | Enable writeStats: true in hugo.yaml |
| Dark mode broken | Wrong config | Use darkMode: 'class' in tailwind.config.js |
# Scaffold
hugo new site my-blog --format yaml
cd my-blog
git init
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
# Configure (see hugo.yaml example above)
# Create posts
hugo new content posts/first-post.md
# Develop
hugo server
# Build
hugo --minify
When to use : Personal blogs, company blogs, news sites
# Scaffold
hugo new site docs --format yaml
cd docs
git init
git submodule add https://github.com/alex-shpak/hugo-book.git themes/hugo-book
# Configure for docs (nested navigation, search)
# See: bundled template `templates/hugo-docs/`
# Create docs
hugo new content docs/getting-started/installation.md
# Build
hugo --minify
When to use : Technical documentation, knowledge bases, API docs
# Scaffold
hugo new site landing --format yaml
# Use custom layouts (no theme)
# See: bundled template `templates/hugo-landing/`
# Single-page structure
hugo new content _index.md
# Build
hugo --minify
When to use : Marketing sites, product pages, portfolios
# hugo.yaml
defaultContentLanguage: "en"
languages:
en:
languageName: "English"
weight: 1
es:
languageName: "Español"
weight: 2
# Content structure:
# content/
# ├── posts/
# │ └── post-1.en.md
# │ └── post-1.es.md
When to use : International sites, localized content
init-hugo.sh - Automated Hugo project setup
./scripts/init-hugo.sh blog my-blog
# Creates Hugo site with specified template (blog/docs/landing/minimal)
# Arguments: [template-type] [project-name]
deploy-workers.sh - Manual Cloudflare Workers deployment
./scripts/deploy-workers.sh
# Runs: hugo --minify && wrangler deploy
check-versions.sh - Verify Hugo and tool versions
./scripts/check-versions.sh
# Checks: Hugo version, Extended edition, wrangler, Node.js
Complete, working Hugo projects ready to copy:
templates/hugo-blog/ - Blog with PaperMod theme
templates/hugo-docs/ - Documentation site
templates/hugo-landing/ - Landing page
templates/minimal-starter/ - Bare-bones project
When to use templates : Copy entire template directory to start a new project instantly.
Detailed guides that Claude can load when needed:
references/sveltia-integration-guide.md - Complete Sveltia CMS setup, OAuth configurationreferences/workers-deployment-guide.md - Cloudflare Workers deployment, CI/CD, custom domainsreferences/common-errors.md - All 9 errors with detailed solutionsreferences/theme-customization-guide.md - Overriding layouts, custom CSS, partialsreferences/hugo-vs-alternatives.md - Comparison with Next.js, Astro, JekyllWhen Claude should load these : User asks about specific topics (CMS setup, deployment, errors, theming, alternatives)
assets/screenshots/ - Visual examples of Hugo blog, Sveltia CMS, deploymentassets/diagrams/ - Hugo directory structure, deployment workflow diagramsCreate reusable content components:
<!-- layouts/shortcodes/youtube.html -->
<div class="youtube-embed">
<iframe
src="https://www.youtube.com/embed/{{ .Get 0 }}"
allowfullscreen>
</iframe>
</div>
Usage in content:
{{< youtube dQw4w9WgXcQ >}}
Hugo has built-in image processing:
{{ $image := resources.Get "images/photo.jpg" }}
{{ $resized := $image.Resize "800x" }}
<img src="{{ $resized.RelPermalink }}" alt="Photo">
Create custom taxonomies beyond tags/categories:
# hugo.yaml
taxonomies:
tag: tags
category: categories
series: series # Custom taxonomy
Use JSON/YAML/TOML data files:
# data/team.yaml
- name: Alice
role: Developer
- name: Bob
role: Designer
Access in templates:
{{ range .Site.Data.team }}
<div>{{ .name }} - {{ .role }}</div>
{{ end }}
Required :
Optional (for deployment):
Optional (for CMS):
Hugo : v0.152.2+extended (October 24, 2025) PaperMod : Latest (via Git submodule) Sveltia CMS : Latest (via CDN) Wrangler : v4.37.1+ (v4.45.3 available)
This skill is based on live testing:
Solution : Install Hugo Extended, not Standard. Verify with hugo version | grep extended
Solution :
theme is set in hugo.yamlthemes/ directorygit submodule update --init --recursiveSolution :
baseURL in hugo.yaml matches deployment URLhugo -b https://your-site.comSolution :
draft: false in frontmatter--buildDrafts and --buildFuture flagsSolution : Add submodules: recursive to checkout action in GitHub Actions
Solution :
hugo/admin directory exists in public/config.yml syntaxUse this checklist to verify your setup:
hugo version shows "+extended")--format yaml (hugo.yaml exists)baseURL configured correctly in hugo.yaml.gitignore includes public/ and resources/_gen/hugo server)hugo --minify)Questions? Issues?
references/common-errors.md for all 9 documented errors and solutionsThis skill provides production-ready Hugo setup with zero errors. All 9 common issues are documented and prevented.
Weekly Installs
87
Repository
GitHub Stars
14
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode77
gemini-cli76
codex73
cursor71
github-copilot65
claude-code62
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
122,000 周安装
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
tmux进程管理最佳实践:交互式Shell初始化、会话命名与生命周期管理
69 周安装
| Dev Server | Vite (port 5173) | Hugo (port 1313) |
| Dark Mode | React ThemeProvider | CSS classes or Alpine.js |
| Asset fingerprinting fails | Incorrect Hugo Pipes usage | Use RelPermalink not Permalink |
| Hugo template syntax in CSS | Can't use {{ }} in CSS | Apply classes in templates, not CSS |
| Version mismatch | CLI vs PostCSS plugin | Update all to same version |