hugo-template-dev

Run Hugo server renders to validate layouts, partials, and shortcodes.

80|330|Updated Dec 13, 2018
One-click install
npx skills add https://github.com/influxdata/docs-v2 --skill hugo-template-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hugo-template-dev
Source: https://github.com/influxdata/docs-v2/tree/main/.claude/skills/hugo-template-dev
Command: npx skills add https://github.com/influxdata/docs-v2 --skill hugo-template-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hugo template development often misses runtime errors that only appear when templates render. This Skill enforces a mandatory runtime testing protocol to catch issues in layouts, partials, and shortcodes before deployment.

Core Features & Use Cases

  • Enforces runtime validation by launching a local Hugo server and attempting page renders to surface template errors.
  • Applies to changes under layouts/, layouts/partials/, and layouts/shortcodes/ with automatic verification of page rendering.
  • Use case: when updating a theme or documentation site, ensure all templates render without panics across common pages.

Quick Start

Start by running the Hugo server on port 1315: npx hugo server --port 1315 2>&1 | head -50 Verify the server is serving pages: curl -s -o /dev/null -w "%{http_code}" http://localhost:1315/ Stop the server after validation: pkill -f "hugo server --port 1315"

Frequently Asked Questions about hugo-template-dev

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

FAQPage Schema
How do I catch Hugo template runtime errors that static builds miss?

To catch Hugo template runtime errors, you need to enforce runtime validation by starting a local Hugo server and rendering pages. This process surfaces template panics in layouts, partials, and shortcodes that static builds miss.

Why does my Hugo site break only when pages render?

Hugo sites break during rendering due to uncaught errors in layouts, partials, or shortcodes. Applying a mandatory runtime testing protocol by launching a local server validates page rendering and identifies these specific template failures before deployment.

How do I validate Hugo layouts and partials before deployment?

To validate Hugo layouts and partials, start a Hugo server on port 1315, verify pages are serving with an HTTP status check, and stop the server after validation. This automatically verifies rendering across common pages.

Does runtime testing work with Hugo shortcodes and documentation sites?

Yes, runtime testing works with Hugo shortcodes and documentation sites. It targets changes under layouts/, layouts/partials/, and layouts/shortcodes/ to validate rendering across pages and prevent runtime failures during theme updates.

What is the best way to test Hugo templates for rendering panics?

The best way to test Hugo templates for rendering panics is enforcing a runtime testing protocol. This involves starting a local server, checking output for errors via HTTP response codes, and providing a reproducible quick-start protocol.