hugo
БесплатноБез исполняемых скриптовНе проверенGuide to building static websites with the Hugo static site generator: blogs, documentation sites, landing pages and portfolios. Covers scaffolding new sites…
Об этом скилле
Hugo Static Site Generator
Status: Production Ready Last Updated: 2025-11-04 Dependencies: None (Hugo is a standalone binary) Latest Versions: [email protected]+extended, PaperMod@latest, Sveltia CMS@latest
Quick Start (5 Minutes)
1. Install Hugo Extended
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:
- Hugo Extended includes SCSS/Sass processing
- Most popular themes (PaperMod, Academic, Docsy) require Extended
- Standard edition will fail with "SCSS support not enabled" errors
- Extended has no downsides (same speed, same features + more)
2. Create New Hugo Site
# 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:
- Use
--format yamlto create hugo.yaml (not hugo.toml) - YAML is required for Sveltia CMS and recommended for TinaCMS
- TOML has known bugs in Sveltia CMS beta
- Git submodules require
--recursiveflag when cloning later
3. Configure and Build
# 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
The 7-Step Setup Process
Step 1: Installation and Verification
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:
- Extended edition required for SCSS/Sass
- Version should be v0.149.0+ for best compatibility
- NPM wrapper may be behind official releases
- Pin version in CI/CD (see Step 7)
Step 2: Project Scaffolding
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:
- Use
--format yamlfor CMS compatibility - Never commit
public/directory to Git - Create
.gitignoreimmediately (see Step 3)
Step 3: Theme Installation
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:
- Git submodules are recommended over manual downloads
--depth=1saves space (no theme history)- Always run
git submodule update --init --recursiveafter clone - Hugo Modules are more advanced but don't require G
Установить hugo в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hugo?
Guide to building static websites with the Hugo static site generator: blogs, documentation sites, landing pages and portfolios. Covers scaffolding new sites, choosing Hugo Extended over Standard, hugo.yaml and hugo.toml configuration, themes such as PaperMod via Git submodules or Hugo Modules, Go templates and Goldmark, Tailwind CSS v4 through Hugo Pipes and PostCSS, headless CMS integration with Sveltia CMS or TinaCMS, multilingual sites, GitHub Actions CI/CD, and deployment to Cloudflare Workers Static Assets or Pages with wrangler. Documents 15 pitfalls: Hugo version mismatch, baseURL errors, theme not found, YAML versus TOML frontmatter, and date-related build failures. Use when creating, styling, adding a CMS to, deploying or troubleshooting a Hugo site.
Как установить скилл hugo?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hugo запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic