Skip to content

secondsky/claude-skills / plugins/hugo/skills/hugo

Hugo static site generator with Tailwind v4, headless CMS (Sveltia/Tina), Cloudflare deployment. Use for blogs, docs sites, or encountering theme installation, frontmatter, baseURL errors.

FileKindSize
SKILL.mdskill md15.7 KB
references/advanced-topics.mdmarkdown11.5 KB
references/cms-integration.mdmarkdown10.5 KB
references/common-patterns.mdmarkdown10.5 KB
references/error-catalog.mdmarkdown11.6 KB
references/setup-guide.mdmarkdown11.0 KB
references/tailwind-integration.mdmarkdown12.4 KB
templates/hugo-blog/.github/workflows/deploy.ymlconfig621 B
templates/hugo-blog/.gitmodulesother112 B
templates/hugo-blog/.hugo_build.lockother0 B
templates/hugo-blog/README.mdmarkdown4.0 KB
templates/hugo-blog/archetypes/default.mdmarkdown101 B
templates/hugo-blog/content/posts/first-post.mdmarkdown504 B
templates/hugo-blog/hugo.yamlconfig643 B
templates/hugo-blog/static/admin/config.ymlconfig1.2 KB
templates/hugo-blog/static/admin/index.htmlother310 B
templates/hugo-blog/themes/PaperMod/.github/ISSUE_TEMPLATE/bug.yamlconfig3.9 KB
templates/hugo-blog/themes/PaperMod/.github/ISSUE_TEMPLATE/config.ymlconfig234 B
templates/hugo-blog/themes/PaperMod/.github/ISSUE_TEMPLATE/enhancement.yamlconfig1.5 KB
templates/hugo-blog/themes/PaperMod/.github/PULL_REQUEST_TEMPLATE.mdmarkdown1.7 KB
templates/hugo-blog/themes/PaperMod/.github/workflows/gh-pages.ymlconfig1.9 KB
templates/hugo-blog/themes/PaperMod/LICENSEother1.1 KB
templates/hugo-blog/themes/PaperMod/README.mdmarkdown4.7 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/404.cssother200 B
templates/hugo-blog/themes/PaperMod/assets/css/common/archive.cssother651 B
templates/hugo-blog/themes/PaperMod/assets/css/common/footer.cssother1.0 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/header.cssother1.3 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/main.cssother1.0 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/post-entry.cssother1.7 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/post-single.cssother6.4 KB
templates/hugo-blog/themes/PaperMod/assets/css/common/profile-mode.cssother689 B
templates/hugo-blog/themes/PaperMod/assets/css/common/search.cssother782 B
templates/hugo-blog/themes/PaperMod/assets/css/common/terms.cssother324 B
templates/hugo-blog/themes/PaperMod/assets/css/core/license.cssother193 B
templates/hugo-blog/themes/PaperMod/assets/css/core/reset.cssother1.3 KB
templates/hugo-blog/themes/PaperMod/assets/css/core/theme-vars.cssother969 B
templates/hugo-blog/themes/PaperMod/assets/css/core/zmedia.cssother1023 B
templates/hugo-blog/themes/PaperMod/assets/css/extended/blank.cssother239 B
templates/hugo-blog/themes/PaperMod/assets/css/includes/chroma-mod.cssother303 B
templates/hugo-blog/themes/PaperMod/assets/css/includes/chroma-styles.cssother4.9 KB
templates/hugo-blog/themes/PaperMod/assets/css/includes/scroll-bar.cssother1.2 KB
templates/hugo-blog/themes/PaperMod/assets/js/fastsearch.jsscript5.6 KB
templates/hugo-blog/themes/PaperMod/assets/js/fuse.basic.min.jsscript15.0 KB
templates/hugo-blog/themes/PaperMod/assets/js/license.jsscript193 B
templates/hugo-blog/themes/PaperMod/go.modmanifest55 B
templates/hugo-blog/themes/PaperMod/i18n/ar.yamlconfig546 B
templates/hugo-blog/themes/PaperMod/i18n/be.yamlconfig805 B
templates/hugo-blog/themes/PaperMod/i18n/bg.yamlconfig322 B
templates/hugo-blog/themes/PaperMod/i18n/bn.yamlconfig695 B
templates/hugo-blog/themes/PaperMod/i18n/ca.yamlconfig313 B
templates/hugo-blog/themes/PaperMod/i18n/ckb.yamlconfig473 B
templates/hugo-blog/themes/PaperMod/i18n/cs.yamlconfig498 B
templates/hugo-blog/themes/PaperMod/i18n/da.yamlconfig435 B
templates/hugo-blog/themes/PaperMod/i18n/de.yamlconfig517 B
templates/hugo-blog/themes/PaperMod/i18n/el.yamlconfig624 B
templates/hugo-blog/themes/PaperMod/i18n/en.yamlconfig486 B
templates/hugo-blog/themes/PaperMod/i18n/eo.yamlconfig378 B
templates/hugo-blog/themes/PaperMod/i18n/es.yamlconfig512 B
templates/hugo-blog/themes/PaperMod/i18n/fa.yamlconfig474 B
templates/hugo-blog/themes/PaperMod/i18n/fi.yamlconfig512 B
templates/hugo-blog/themes/PaperMod/i18n/fr.yamlconfig505 B
templates/hugo-blog/themes/PaperMod/i18n/he.yamlconfig543 B
templates/hugo-blog/themes/PaperMod/i18n/hi.yamlconfig367 B
templates/hugo-blog/themes/PaperMod/i18n/hr.yamlconfig543 B
templates/hugo-blog/themes/PaperMod/i18n/hu.yamlconfig275 B
templates/hugo-blog/themes/PaperMod/i18n/id.yamlconfig500 B
templates/hugo-blog/themes/PaperMod/i18n/it.yamlconfig509 B
templates/hugo-blog/themes/PaperMod/i18n/ja.yamlconfig505 B
templates/hugo-blog/themes/PaperMod/i18n/ko.yamlconfig506 B
templates/hugo-blog/themes/PaperMod/i18n/ku.yamlconfig391 B
templates/hugo-blog/themes/PaperMod/i18n/mn.yamlconfig411 B
templates/hugo-blog/themes/PaperMod/i18n/ms.yamlconfig439 B
templates/hugo-blog/themes/PaperMod/i18n/nl.yamlconfig509 B
templates/hugo-blog/themes/PaperMod/i18n/no.yamlconfig504 B
templates/hugo-blog/themes/PaperMod/i18n/oc.yamlconfig497 B
templates/hugo-blog/themes/PaperMod/i18n/pa.yamlconfig582 B
templates/hugo-blog/themes/PaperMod/i18n/pl.yamlconfig517 B
templates/hugo-blog/themes/PaperMod/i18n/pnb.yamlconfig533 B
templates/hugo-blog/themes/PaperMod/i18n/pt.yamlconfig523 B
templates/hugo-blog/themes/PaperMod/i18n/ro.yamlconfig499 B
templates/hugo-blog/themes/PaperMod/i18n/ru.yamlconfig805 B
templates/hugo-blog/themes/PaperMod/i18n/sk.yamlconfig496 B
templates/hugo-blog/themes/PaperMod/i18n/sv.yamlconfig440 B
templates/hugo-blog/themes/PaperMod/i18n/sw.yamlconfig502 B
templates/hugo-blog/themes/PaperMod/i18n/th.yamlconfig614 B
templates/hugo-blog/themes/PaperMod/i18n/tr.yamlconfig508 B
templates/hugo-blog/themes/PaperMod/i18n/uk.yamlconfig454 B
templates/hugo-blog/themes/PaperMod/i18n/uz.yamlconfig335 B
templates/hugo-blog/themes/PaperMod/i18n/vi.yamlconfig533 B
templates/hugo-blog/themes/PaperMod/i18n/zh-tw.yamlconfig525 B
templates/hugo-blog/themes/PaperMod/i18n/zh.yamlconfig493 B
templates/hugo-blog/themes/PaperMod/images/screenshot.pngbinary138.2 KB
templates/hugo-blog/themes/PaperMod/images/tn.pngbinary15.5 KB
templates/hugo-blog/themes/PaperMod/layouts/404.htmlother85 B
templates/hugo-blog/themes/PaperMod/layouts/_default/_markup/render-image.htmlother730 B
templates/hugo-blog/themes/PaperMod/layouts/_default/archives.htmlother2.7 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/baseof.htmlother1.0 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/index.jsonconfig341 B
templates/hugo-blog/themes/PaperMod/layouts/_default/list.htmlother4.0 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/rss.xmlconfig3.4 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/search.htmlother1.0 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/single.htmlother2.2 KB
templates/hugo-blog/themes/PaperMod/layouts/_default/terms.htmlother643 B
templates/hugo-blog/themes/PaperMod/layouts/partials/anchored_headings.htmlother212 B
templates/hugo-blog/themes/PaperMod/layouts/partials/author.htmlother316 B
templates/hugo-blog/themes/PaperMod/layouts/partials/breadcrumbs.htmlother692 B
templates/hugo-blog/themes/PaperMod/layouts/partials/comments.htmlother151 B
templates/hugo-blog/themes/PaperMod/layouts/partials/cover.htmlother3.0 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/edit_post.htmlother692 B
templates/hugo-blog/themes/PaperMod/layouts/partials/extend_footer.htmlother169 B
templates/hugo-blog/themes/PaperMod/layouts/partials/extend_head.htmlother313 B
templates/hugo-blog/themes/PaperMod/layouts/partials/footer.htmlother5.1 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/head.htmlother8.7 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/header.htmlother6.1 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/home_info.htmlother425 B
templates/hugo-blog/themes/PaperMod/layouts/partials/index_profile.htmlother2.8 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/post_canonical.htmlother599 B
templates/hugo-blog/themes/PaperMod/layouts/partials/post_meta.htmlother836 B
templates/hugo-blog/themes/PaperMod/layouts/partials/post_nav_links.htmlother543 B
templates/hugo-blog/themes/PaperMod/layouts/partials/share_icons.htmlother9.9 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/social_icons.htmlother320 B
templates/hugo-blog/themes/PaperMod/layouts/partials/svg.htmlother177.0 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/templates/_funcs/get-page-images.htmlother1.4 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/templates/opengraph.htmlother2.6 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/templates/schema_json.htmlother3.9 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/templates/twitter_cards.htmlother1.2 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/toc.htmlother4.3 KB
templates/hugo-blog/themes/PaperMod/layouts/partials/translation_list.htmlother627 B
templates/hugo-blog/themes/PaperMod/layouts/robots.txtmarkdown164 B
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/collapse.htmlother298 B
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/figure.htmlother1.4 KB
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/inTextImg.htmlother181 B
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/ltr.htmlother286 B
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/rawhtml.htmlother32 B
templates/hugo-blog/themes/PaperMod/layouts/shortcodes/rtl.htmlother286 B
templates/hugo-blog/themes/PaperMod/theme.tomlconfig1.1 KB
templates/hugo-blog/wrangler.jsoncother198 B
templates/hugo-docs/README.mdmarkdown8.5 KB
templates/hugo-docs/archetypes/default.mdmarkdown104 B
templates/hugo-docs/content/_index.mdmarkdown568 B
templates/hugo-docs/content/docs/_index.mdmarkdown164 B
templates/hugo-docs/content/docs/advanced/_index.mdmarkdown136 B
templates/hugo-docs/content/docs/advanced/customization.mdmarkdown2.3 KB
templates/hugo-docs/content/docs/configuration.mdmarkdown1.5 KB
templates/hugo-docs/content/docs/getting-started.mdmarkdown1.2 KB
templates/hugo-docs/hugo.yamlconfig1.3 KB
templates/hugo-docs/resources/_gen/assets/book.scss_b807c86e8030af4cdc30edccea379f5f.contentother17.0 KB
templates/hugo-docs/resources/_gen/assets/book.scss_b807c86e8030af4cdc30edccea379f5f.jsonconfig188 B
templates/hugo-docs/themes/hugo-book/.github/workflows/deploy.ymlconfig987 B
templates/hugo-docs/themes/hugo-book/.github/workflows/main.ymlconfig640 B
templates/hugo-docs/themes/hugo-book/.gitignoreother66 B
templates/hugo-docs/themes/hugo-book/LICENSEother1.1 KB
templates/hugo-docs/themes/hugo-book/README.mdmarkdown12.9 KB
templates/hugo-docs/themes/hugo-book/archetypes/docs.mdmarkdown227 B
templates/hugo-docs/themes/hugo-book/archetypes/posts.mdmarkdown148 B
templates/hugo-docs/themes/hugo-book/assets/_custom.scssother310 B
templates/hugo-docs/themes/hugo-book/assets/_defaults.scssother2.2 KB
templates/hugo-docs/themes/hugo-book/assets/_fonts.scssother130 B
templates/hugo-docs/themes/hugo-book/assets/_main.scssother6.3 KB
templates/hugo-docs/themes/hugo-book/assets/_markdown.scssother3.9 KB
templates/hugo-docs/themes/hugo-book/assets/_print.scssother260 B
templates/hugo-docs/themes/hugo-book/assets/_shortcodes.scssother5.1 KB
templates/hugo-docs/themes/hugo-book/assets/_utils.scssother1.0 KB
templates/hugo-docs/themes/hugo-book/assets/_variables.scssother44 B
templates/hugo-docs/themes/hugo-book/assets/book.scssother370 B
templates/hugo-docs/themes/hugo-book/assets/clipboard.jsscript396 B
templates/hugo-docs/themes/hugo-book/assets/icons/backward.svgother347 B
templates/hugo-docs/themes/hugo-book/assets/icons/calendar.svgother411 B
templates/hugo-docs/themes/hugo-book/assets/icons/chevron-right.svgother178 B
templates/hugo-docs/themes/hugo-book/assets/icons/edit.svgother659 B
templates/hugo-docs/themes/hugo-book/assets/icons/forward.svgother349 B
templates/hugo-docs/themes/hugo-book/assets/icons/menu.svgother451 B
templates/hugo-docs/themes/hugo-book/assets/icons/toc.svgother753 B
templates/hugo-docs/themes/hugo-book/assets/icons/translate.svgother650 B
templates/hugo-docs/themes/hugo-book/assets/katex.jsonconfig185 B
templates/hugo-docs/themes/hugo-book/assets/manifest.jsonconfig333 B
templates/hugo-docs/themes/hugo-book/assets/menu-reset.jsscript265 B
templates/hugo-docs/themes/hugo-book/assets/mermaid.jsonconfig70 B
templates/hugo-docs/themes/hugo-book/assets/normalize.cssother3.3 KB
templates/hugo-docs/themes/hugo-book/assets/plugins/_numbered.scssother618 B
templates/hugo-docs/themes/hugo-book/assets/plugins/_scrollbars.scssother394 B
templates/hugo-docs/themes/hugo-book/assets/search-data.jsonconfig706 B
templates/hugo-docs/themes/hugo-book/assets/search.jsscript2.7 KB
templates/hugo-docs/themes/hugo-book/assets/sw-register.jsscript223 B
templates/hugo-docs/themes/hugo-book/assets/sw.jsscript1.3 KB
templates/hugo-docs/themes/hugo-book/exampleSite/assets/_custom.scssother103 B
templates/hugo-docs/themes/hugo-book/exampleSite/assets/_variables.scssother44 B
templates/hugo-docs/themes/hugo-book/exampleSite/assets/asciinema-627097.castother60.5 KB
templates/hugo-docs/themes/hugo-book/exampleSite/assets/book-starter.castother33.8 KB
templates/hugo-docs/themes/hugo-book/exampleSite/assets/placeholder.svgother585 B
templates/hugo-docs/themes/hugo-book/exampleSite/assets/thumbnail.svgother585 B
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/_index.mdmarkdown2.2 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/_index.mdmarkdown2.7 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/collapsed/3rd-level/4th-level.mdmarkdown551 B
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/collapsed/3rd-level/_index.mdmarkdown1.4 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/collapsed/_index.mdmarkdown45 B
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/hidden.mdmarkdown1.7 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/_index.mdmarkdown3.5 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/with-toc.mdmarkdown2.7 KB
templates/hugo-docs/themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/without-toc.mdmarkdown2.4 KB

references/advanced-topics.md

View on GitHub
# Hugo Advanced Topics

Advanced Hugo features for experienced users: custom shortcodes, image processing, taxonomies, data files, and more.

---

## Custom Shortcodes

Shortcodes are reusable content components that can be embedded in Markdown.

> **Note (Hugo 0.146+):** shortcode templates now live in `layouts/_shortcodes/`
> (was `layouts/shortcodes/`). The old path still works via back-compat mapping,
> but new projects should use `_shortcodes/`.

### Simple Shortcode: YouTube Embed

**Create `layouts/_shortcodes/youtube.html`:**

```go-html-template
<div class="youtube-embed">
  <iframe
    src="https://www.youtube.com/embed/{{ .Get 0 }}"
    frameborder="0"
    allowfullscreen>
  </iframe>
</div>
```

**Usage in content:**
```markdown
{{< youtube dQw4w9WgXcQ >}}
```

### Named Parameters: Alert Box

**Create `layouts/_shortcodes/alert.html`:**

```go-html-template
<div class="alert alert-{{ .Get "type" | default "info" }}">
  {{ .Inner | markdownify }}
</div>
```

**Usage in content:**
```markdown
{{< alert type="warning" >}}
**Warning:** This is important!
{{< /alert >}}
```

### Complex Shortcode: Code Tabs

**Create `layouts/_shortcodes/tabs.html`:**

```go-html-template
<div class="code-tabs">
  <div class="tabs">
    {{ range $index, $tab := split (.Get "tabs") "," }}
    <button class="tab-button{{ if eq $index 0 }} active{{ end }}" data-tab="{{ $index }}">
      {{ $tab }}
    </button>
    {{ end }}
  </div>
  <div class="tab-content">
    {{ .Inner | markdownify }}
  </div>
</div>

<script>
  document.querySelectorAll('.tab-button').forEach(button => {
    button.addEventListener('click', () => {
      // Tab switching logic
    });
  });
</script>
```

**Usage:**
```markdown
{{< tabs tabs="JavaScript,TypeScript,Python" >}}
```js
console.log('Hello');
```

```ts
console.log('Hello' as string);
```

```python
print('Hello')
```
{{< /tabs >}}
```

---

## Image Processing

Hugo has powerful built-in image processing capabilities.

### Basic Resizing

```go-html-template
{{ $image := resources.Get "images/photo.jpg" }}
{{ $resized := $image.Resize "800x" }}
<img src="{{ $resized.RelPermalink }}" alt="Photo">
```

### Responsive Images

```go-html-template
{{ $image := resources.Get "images/photo.jpg" }}
{{ $small := $image.Resize "400x" }}
{{ $medium := $image.Resize "800x" }}
{{ $large := $image.Resize "1200x" }}

<picture>
  <source srcset="{{ $large.RelPermalink }}" media="(min-width: 1024px)">
  <source srcset="{{ $medium.RelPermalink }}" media="(min-width: 640px)">
  <img src="{{ $small.RelPermalink }}" alt="Responsive image">
</picture>
```

### Image Filters

```go-html-template
{{ $image := resources.Get "images/photo.jpg" }}
{{ $processed := $image.Resize "800x" | images.Filter images.Grayscale images.GaussianBlur 8 }}
<img src="{{ $processed.RelPermalink }}" alt="Processed">
```

### WebP Conversion

```go-html-template
{{ $image := resources.Get "images/photo.jpg" }}
{{ $webp := $image.Resize "800x webp" }}
{{ $fallback := $image.Resize "800x" }}

<picture>
  <source srcset="{{ $webp.RelPermalink }}" type="image/webp">
  <img src="{{ $fallback.RelPermalink }}" alt="Photo">
</picture>
```

### Thumbnails with Cropping

```go-html-template
{{ $image := resources.Get "images/photo.jpg" }}
{{ $thumbnail := $image.Fill "300x200 center" }}
<img src="{{ $thumbnail.RelPermalink }}" alt="Thumbnail">
```

---

## Custom Taxonomies

Create custom taxonomies beyond the built-in tags and categories.

### Configuration

```yaml
# hugo.yaml
taxonomies:
  tag: tags
  category: categories
  series: series        # Custom taxonomy
  author: authors       # Custom taxonomy
  difficulty: difficulties  # Custom taxonomy
```

### Using Custom Taxonomies

**In content frontmatter:**
```yaml
---
title: "My Post"
series: ["Getting Started"]
authors: ["Alice", "Bob"]
difficulties: ["Beginner"]
---
```

**List all series:**
```go-html-template
<!-- layouts/series.html (Hugo 0.146+: root, was _default/series.html) -->
{{ range .Site.Taxonomies.series }}
  <a href="{{ .Page.Permalink }}">
    {{ .Page.Title }} ({{ .Count }} posts)
  </a>
{{ end }}
```

**List posts in a series:**
```go-html-template
<!-- layouts/series/list.html -->
{{ define "main" }}
<h1>{{ .Title }}</h1>
<ul>
  {{ range .Pages }}
  <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
  {{ end }}
</ul>
{{ end }}
```

---

## Data Files

Use external data files (JSON, YAML, TOML) for structured content.

### Data File Example

**Create `data/team.yaml`:**
```yaml
- name: Alice Smith
  role: Developer
  image: /images/alice.jpg
  bio: Full-stack developer with 5 years experience

- name: Bob Jones
  role: Designer
  image: /images/bob.jpg
  bio: UI/UX designer passionate about user experience
```

### Using Data Files

```go-html-template
<!-- layouts/_partials/team.html (Hugo 0.146+: _partials/, was partials/) -->
<div class="team-grid">
  {{ range .Site.Data.team }}
  <div class="team-member">
    <img src="{{ .image }}" alt="{{ .name }}">
    <h3>{{ .name }}</h3>
    <p class="role">{{ .role }}</p>
    <p class="bio">{{ .bio }}</p>
  </div>
  {{ end }}
</div>
```

### Remote Data (API)

```go-html-template
{{ $data := getJSON "https://api.example.com/posts" }}
{{ range $data.posts }}
  <article>
    <h2>{{ .title }}</h2>
    <p>{{ .excerpt }}</p>
  </article>
{{ end }}
```

### CSV Data

**Create `data/prices.csv`:**
```csv
Product,Price,Available
Widget A,29.99,true
Widget B,39.99,false
Widget C,49.99,true
```

**Use in template:**
```go-html-template
{{ $prices := .Site.Data.prices }}
{{ range $prices }}
  <div>{{ .Product }}: ${{ .Price }}</div>
{{ end }}
```

---

## Page Bundles

Organize content and resources together.

### Leaf Bundle (Single Page)

```
content/
└── posts/
    └── my-post/
        ├── index.md         # Page content
        ├── image1.jpg       # Page resource
        ├── image2.jpg
        └── document.pdf
```

**Access resources:**
```go-html-template
{{ with .Resources.GetMatch "image1.jpg" }}
  <img src="{{ .RelPermalink }}" alt="Image 1">
{{ end }}

{{ range .Resources.ByType "image" }}
  <img src="{{ .RelPermalink }}" alt="{{ .Name }}">
{{ end }}
```

### Branch Bundle (Section Page)

```
content/
└── blog/
    ├── _index.md          # Section page
    ├── header-image.jpg   # Section resource
    ├── post-1/
    │   └── index.md
    └── post-2/
        └── index.md
```

---

## Template Overrides

Override theme templates without modifying the theme.

> **Hugo 0.146+ template layout** (this skill targets 0.164): the legacy
> `layouts/_default/`, `layouts/partials/`, and `layouts/shortcodes/` folders
> were renamed as part of the template-engine rewrite. The old paths still work
> via a back-compat mapping, but Hugo recommends the new locations:
>
> | Old (pre-0.146)               | New (0.146+)            |
> |-------------------------------|-------------------------|
> | `layouts/_default/single.html`| `layouts/single.html` (root) |
> | `layouts/_default/list.html`  | `layouts/list.html` (root)   |
> | `layouts/partials/`           | `layouts/_partials/`         |
> | `layouts/shortcodes/`         | `layouts/_shortcodes/`       |
> | `layouts/index.html` (home)   | `layouts/home.html`          |
>
> See https://gohugo.io/templates/new-templatesystem-overview/ . When overriding
> templates in a theme, mirror whatever path the theme itself uses (most themes
> have migrated; some older themes still ship the legacy layout and will work
> through the mapping).

### Directory Structure

```
layouts/
├── single.html          # Overrides theme's single.html (was _default/single.html)
├── _partials/
│   └── header.html      # Overrides theme's header.html (was partials/header.html)
└── posts/
    └── single.html      # Specific to posts section
```

### Partial Templates

**Create custom partial:**
```go-html-template
<!-- layouts/_partials/custom-footer.html -->
<footer>
  <p>&copy; {{ now.Year }} {{ .Site.Title }}</p>
  {{ partial "social-icons.html" . }}
</footer>
```

**Use in template:**
```go-html-template
{{ partial "custom-footer.html" . }}
```

---

## Content Types

Define custom content types with specific layouts.

### Configuration

```yaml
# hugo.yaml
taxonomies:
  tag: tags
  category: categories

[...]
```

### Create Archetype

**`archetypes/portfolio.md`:**
```yaml
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
type: "portfolio"
thumbnail: ""
featured_image: ""
technologies: []
github_url: ""
demo_url: ""
---
```

### Create Content

```bash
hugo new portfolio/project-1.md
```

### Custom Template

**`layouts/portfolio/single.html`:**
```go-html-template
{{ define "main" }}
<article class="portfolio-item">
  <h1>{{ .Title }}</h1>
  <img src="{{ .Params.featured_image }}" alt="{{ .Title }}">

  {{ .Content }}

  <div class="technologies">
    {{ range .Params.technologies }}
    <span class="tech-tag">{{ . }}</span>
    {{ end }}
  </div>

  <div class="links">
    {{ if .Params.github_url }}
    <a href="{{ .Params.github_url }}">GitHub</a>
    {{ end }}
    {{ if .Params.demo_url }}
    <a href="{{ .Params.demo_url }}">Live Demo</a>
    {{ end }}
  </div>
</article>
{{ end }}
```

---

## Hugo Modules

Advanced dependency management (alternative to Git submodules).

### Initialize Module

```bash
hugo mod init github.com/username/my-site
```

### Import Theme as Module

**`hugo.yaml`:**
```yaml
module:
  imports:
    - path: github.com/adityatelange/hugo-PaperMod
```

### Commands

```bash
# Get dependencies
hugo mod get

# Update dependencies
hugo mod get -u

# Tidy dependencies
hugo mod tidy

# Clean module cache
hugo mod clean

# Vendor dependencies
hugo mod vendor
```

---

## Build Performance

### Caching

```yaml
# hugo.yaml
caches:
  assets:
    dir: :resourceDir/_gen
    maxAge: 720h
  getjson:
    dir: :cacheDir/:project
    maxAge: 1h
  getcsv:
    dir: :cacheDir/:project
    maxAge: 1h
  images:
    dir: :resourceDir/_gen
    maxAge: 720h
```

### Parallel Processing

```yaml
# hugo.yaml
build:
  useResourceCacheWhen: fallback
```

### Ignore Content

```yaml
# hugo.yaml
ignoreFiles:
  - \.foo$
  - \.bak$
  - drafts/
```

---

## Custom Output Formats

Create custom output formats beyond HTML.

### Configuration

```yaml
# hugo.yaml
outputs:
  home:
    - HTML
    - RSS
    - JSON
  section:
    - HTML
    - JSON

outputFormats:
  JSON:
    mediaType: application/json
    baseName: index
    isPlainText: true
    notAlternative: true
```

### Template for JSON

**`layouts/list.json.json`** (Hugo 0.146+: moved from `_default/` to root):
```go-html-template
{
  "items": [
    {{ range $index, $page := .Pages }}
    {{ if $index }},{{ end }}
    {
      "title": {{ .Title | jsonify }},
      "url": {{ .Permalink | jsonify }},
      "date": {{ .Date.Format "2006-01-02" | jsonify }},
      "summary": {{ .Summary | jsonify }}
    }
    {{ end }}
  ]
}
```

---

## Multilingual Menus

Define different menus per language.

```yaml
# hugo.yaml
languages:
  en:
    weight: 1
    languageName: "English"
    menu:
      main:
        - name: Home
          url: /
        - name: About
          url: /about
  es:
    weight: 2
    languageName: "Español"
    menu:
      main:
        - name: Inicio
          url: /
        - name: Acerca de
          url: /about
```

---

## Official Documentation

- **Hugo Templates**: https://gohugo.io/templates/
- **Image Processing**: https://gohugo.io/content-management/image-processing/
- **Taxonomies**: https://gohugo.io/content-management/taxonomies/
- **Data Templates**: https://gohugo.io/templates/data-templates/
- **Hugo Modules**: https://gohugo.io/hugo-modules/
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall