hugo-templating

Teach Go template syntax for Hugo layouts, partials, and shortcodes.

1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/hughescr/claude-code-config --skill hugo-templating
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hugo-templating
Source: https://github.com/hughescr/claude-code-config/tree/main/plugins/hugo/skills/hugo-templating
Command: npx skills add https://github.com/hughescr/claude-code-config --skill hugo-templating

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers understand and apply Hugo's Go template syntax for building robust layouts, partials, and shortcodes, reducing templating confusion and iteration time.

Core Features & Use Cases

  • Go template fundamentals: variables, conditionals, loops, blocks, and context in Hugo templates.
  • Layout and lookup: how Hugo selects base templates, _default layouts, and shortcodes integration.
  • Practical patterns: creating baseof.html, single/list templates, and reusable partials for consistent sites.

Quick Start

Create a base template (baseof.html) with header, main block, and footer, then override it with a content page and demonstrate a custom shortcode in a Hugo site.

Frequently Asked Questions about hugo-templating

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Hugo layout lookup order work when selecting templates?

Hugo uses a specific lookup order to select base templates, _default layouts, and single/list templates based on content type and section. This skill clarifies that hierarchy to ensure correct layout inheritance across pages and components.

How do I create reusable components in Hugo templates?

You build reusable components in Hugo by creating partials for layout elements and shortcodes for content snippets. This skill covers Go template syntax including blocks, variables, and conditionals to implement these modular patterns.

What's the best way to structure a baseof.html template in Hugo?

A baseof.html template should define header, footer, and a main content block. This skill demonstrates how to override those blocks in specific content pages to achieve rapid iteration and consistent site design.

Why is my Hugo shortcode not rendering correctly?

Shortcode rendering issues usually stem from incorrect Go template syntax or lost context. This skill provides common debugging patterns for Hugo templates to help identify and resolve layout and shortcode errors.

Do I need to know Go templates to build Hugo themes?

Yes, building Hugo themes requires Go template syntax for layouts, partials, and shortcodes. This skill teaches the necessary fundamentals including variables, loops, blocks, and conditionals to construct functional themes.