hugo-template-dev — for Claude Code hugo-template-dev, docs-v2, community, for Claude Code, ide skills, npx hugo --quiet, layouts, **Success criteria:** - No, messages - No, errors - No

v1.1

このスキルについて

適した場面: Ideal for AI agents that need hugo template development skill. ローカライズされた概要: InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

機能

Hugo Template Development Skill
Critical Testing Requirement
Hugo's npx hugo --quiet only validates template syntax, not runtime execution.
Mandatory Testing Protocol
For ANY Hugo Template Change

# Core Topics

influxdata influxdata
[81]
[324]
Updated: 4/21/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 10/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
10/11
Quality Score
80
Canonical Locale
en
Detected Body Locale
en

適した場面: Ideal for AI agents that need hugo template development skill. ローカライズされた概要: InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

このスキルを使用する理由

推奨ポイント: hugo-template-dev helps agents hugo template development skill. InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and

おすすめ

適した場面: Ideal for AI agents that need hugo template development skill.

実現可能なユースケース for hugo-template-dev

ユースケース: Applying Hugo Template Development Skill
ユースケース: Applying Critical Testing Requirement
ユースケース: Applying Hugo's npx hugo --quiet only validates template syntax, not runtime execution

! セキュリティと制限

  • 制約事項: Hugo's npx hugo --quiet only validates template syntax, not runtime execution.
  • 制約事項: Critical Testing Requirement Hugo's npx hugo --quiet only validates template syntax, not runtime execution
  • 制約事項: You MUST test templates by running the server

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is hugo-template-dev?

適した場面: Ideal for AI agents that need hugo template development skill. ローカライズされた概要: InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install hugo-template-dev?

Run the command: npx killer-skills add influxdata/docs-v2/hugo-template-dev. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for hugo-template-dev?

Key use cases include: ユースケース: Applying Hugo Template Development Skill, ユースケース: Applying Critical Testing Requirement, ユースケース: Applying Hugo's npx hugo --quiet only validates template syntax, not runtime execution.

Which IDEs are compatible with hugo-template-dev?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for hugo-template-dev?

制約事項: Hugo's npx hugo --quiet only validates template syntax, not runtime execution.. 制約事項: Critical Testing Requirement Hugo's npx hugo --quiet only validates template syntax, not runtime execution. 制約事項: You MUST test templates by running the server.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add influxdata/docs-v2/hugo-template-dev. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use hugo-template-dev immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

hugo-template-dev

Install hugo-template-dev, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Hugo Template Development Skill

Purpose

This skill enforces proper Hugo template development practices, including mandatory runtime testing to catch errors that static builds miss.

Critical Testing Requirement

Hugo's npx hugo --quiet only validates template syntax, not runtime execution.

Template errors like accessing undefined fields, nil values, or incorrect type assertions only appear when Hugo actually renders pages. You MUST test templates by running the server.

Mandatory Testing Protocol

For ANY Hugo Template Change

After modifying files in layouts/, layouts/partials/, or layouts/shortcodes/:

Step 1: Start Hugo server and capture output

bash
1npx hugo server --port 1315 2>&1 | head -50

Success criteria:

  • No error calling partial messages
  • No can't evaluate field errors
  • No template: ... failed messages
  • Server shows "Web Server is available at http://localhost:1315/"

If errors appear: Fix the template and repeat Step 1 before proceeding.

Step 2: Verify the page renders

bash
1curl -s -o /dev/null -w "%{http_code}" http://localhost:1315/PATH/TO/PAGE/

Expected: HTTP 200 status code

Step 3: Browser testing (if MCP browser tools available)

If mcp__claude-in-chrome__* tools are available, use them for visual inspection:

# Navigate and screenshot
mcp__claude-in-chrome__navigate({ url: "http://localhost:1315/PATH/", tabId: ... })
mcp__claude-in-chrome__computer({ action: "screenshot", tabId: ... })

# Check for JavaScript errors
mcp__claude-in-chrome__read_console_messages({ tabId: ..., onlyErrors: true })

This catches runtime JavaScript errors that template changes may introduce.

Step 4: Stop the test server

bash
1pkill -f "hugo server --port 1315"

Quick Test Command

Use this one-liner to test and get immediate feedback:

bash
1timeout 15 npx hugo server --port 1315 2>&1 | grep -E "(error|Error|ERROR|fail|FAIL)" | head -20; pkill -f "hugo server --port 1315" 2>/dev/null

If output is empty, no errors were detected.

Common Hugo Template Errors

1. Accessing Hyphenated Keys

Wrong:

go
1{{ .Site.Data.article-data.influxdb }}

Correct:

go
1{{ index .Site.Data "article-data" "influxdb" }}

2. Nil Field Access

Wrong:

go
1{{ range $articles }} 2 {{ .path }} {{/* Fails if item is nil or wrong type */}} 3{{ end }}

Correct:

go
1{{ range $articles }} 2 {{ if . }} 3 {{ with index . "path" }} 4 {{ . }} 5 {{ end }} 6 {{ end }} 7{{ end }}

3. Type Assertion on Interface{}

Wrong:

go
1{{ range $data }} 2 {{ .fields.menuName }} 3{{ end }}

Correct:

go
1{{ range $data }} 2 {{ if isset . "fields" }} 3 {{ $fields := index . "fields" }} 4 {{ if isset $fields "menuName" }} 5 {{ index $fields "menuName" }} 6 {{ end }} 7 {{ end }} 8{{ end }}

4. Empty Map vs Nil Check

Problem: Hugo's {{ if . }} passes for empty maps {}:

go
1{{/* This doesn't catch empty maps */}} 2{{ if $data }} 3 {{ .field }} {{/* Still fails if $data is {} */}} 4{{ end }}

Solution: Check for specific keys:

go
1{{ if and $data (isset $data "field") }} 2 {{ index $data "field" }} 3{{ end }}

Hugo Data Access Patterns

Safe Nested Access

go
1{{/* Build up access with nil checks at each level */}} 2{{ $articleDataRoot := index .Site.Data "article-data" }} 3{{ if $articleDataRoot }} 4 {{ $influxdbData := index $articleDataRoot "influxdb" }} 5 {{ if $influxdbData }} 6 {{ $productData := index $influxdbData $dataKey }} 7 {{ if $productData }} 8 {{ with $productData.articles }} 9 {{/* Safe to use . here */}} 10 {{ end }} 11 {{ end }} 12 {{ end }} 13{{ end }}

Iterating Over Data Safely

go
1{{ range $idx, $item := $articles }} 2 {{/* Declare variables with defaults */}} 3 {{ $path := "" }} 4 {{ $name := "" }} 5 6 {{/* Safely extract values */}} 7 {{ if isset $item "path" }} 8 {{ $path = index $item "path" }} 9 {{ end }} 10 11 {{ if $path }} 12 {{/* Now safe to use $path */}} 13 {{ end }} 14{{ end }}

File Organization

Layouts Directory Structure

layouts/
├── _default/           # Default templates
├── partials/           # Reusable template fragments
│   └── api/            # API-specific partials
├── shortcodes/         # Content shortcodes
└── TYPE/               # Type-specific templates (api/, etc.)
    └── single.html     # Single page template

Partial Naming

  • Use descriptive names: api/sidebar-nav.html, not nav.html
  • Group related partials in subdirectories
  • Include comments at the top describing purpose and required context

Separation of Concerns: Templates vs TypeScript

Principle: Hugo templates handle structure and data binding. TypeScript handles behavior and interactivity.

What Goes Where

ConcernLocationExample
HTML structurelayouts/**/*.htmlNavigation markup, tab containers
Data bindinglayouts/**/*.html{{ .Title }}, {{ range .Data }}
Static stylingassets/styles/**/*.scssLayout, colors, typography
User interactionassets/js/components/*.tsClick handlers, scroll behavior
State managementassets/js/components/*.tsActive tabs, collapsed sections
DOM manipulationassets/js/components/*.tsShow/hide, class toggling

Anti-Pattern: Inline JavaScript in Templates

Wrong - JavaScript mixed with template:

html
1{{/* DON'T DO THIS */}} 2<nav class="api-nav"> 3 {{ range $articles }} 4 <button onclick="toggleSection('{{ .id }}')">{{ .name }}</button> 5 {{ end }} 6</nav> 7 8<script> 9function toggleSection(id) { 10 document.getElementById(id).classList.toggle('is-open'); 11} 12</script>

Correct - Clean separation:

Template (layouts/partials/api/sidebar-nav.html):

html
1<nav class="api-nav" data-component="api-nav"> 2 {{ range $articles }} 3 <button class="api-nav-group-header" aria-expanded="false"> 4 {{ .name }} 5 </button> 6 <ul class="api-nav-group-items"> 7 {{/* items */}} 8 </ul> 9 {{ end }} 10</nav>

TypeScript (assets/js/components/api-nav.ts):

typescript
1interface ApiNavOptions { 2 component: HTMLElement; 3} 4 5export default function initApiNav({ component }: ApiNavOptions): void { 6 const headers = component.querySelectorAll('.api-nav-group-header'); 7 8 headers.forEach((header) => { 9 header.addEventListener('click', () => { 10 const isOpen = header.classList.toggle('is-open'); 11 header.setAttribute('aria-expanded', String(isOpen)); 12 header.nextElementSibling?.classList.toggle('is-open', isOpen); 13 }); 14 }); 15}

Register in main.js:

javascript
1import initApiNav from './components/api-nav.js'; 2 3const componentRegistry = { 4 'api-nav': initApiNav, 5 // ... other components 6};

Data Passing Pattern

Pass Hugo data to TypeScript via data-* attributes:

Template:

html
1<div 2 data-component="api-toc" 3 data-headings="{{ .headings | jsonify | safeHTMLAttr }}" 4 data-scroll-offset="80" 5> 6</div>

TypeScript:

typescript
1interface TocOptions { 2 component: HTMLElement; 3} 4 5interface TocData { 6 headings: string[]; 7 scrollOffset: number; 8} 9 10function parseData(component: HTMLElement): TocData { 11 const headingsRaw = component.dataset.headings; 12 const headings = headingsRaw ? JSON.parse(headingsRaw) : []; 13 const scrollOffset = parseInt(component.dataset.scrollOffset || '0', 10); 14 15 return { headings, scrollOffset }; 16} 17 18export default function initApiToc({ component }: TocOptions): void { 19 const data = parseData(component); 20 // Use data.headings and data.scrollOffset 21}

Minimal Inline Scripts (Exception)

The only acceptable inline scripts are minimal initialization that MUST run before component registration:

html
1{{/* Acceptable: Critical path, no logic, runs immediately */}} 2<script> 3 document.documentElement.dataset.theme = 4 localStorage.getItem('theme') || 'light'; 5</script>

Everything else belongs in assets/js/.

File Organization for Components

assets/
├── js/
│   ├── main.js                    # Entry point, component registry
│   ├── components/
│   │   └── api-toc.ts             # API table of contents behavior
│   └── utils/
│       └── dom-helpers.ts         # Shared DOM utilities
└── styles/
    └── layouts/
        ├── _api-layout.scss       # API page layout (3-column, sidebar, TOC)
        └── _api-operations.scss   # Operation rendering (methods, params, responses)

TypeScript Component Checklist

When creating a new interactive feature:

  1. Create TypeScript file in assets/js/components/
  2. Define interface for component options
  3. Export default initializer function
  4. Register in main.js componentRegistry
  5. Add data-component attribute to HTML element
  6. Pass data via data-* attributes (not inline JS)
  7. NO inline <script> tags in templates

Debugging Templates

Enable Verbose Mode

bash
1npx hugo server --port 1315 --verbose 2>&1 | head -100
go
1{{/* Temporary debugging - REMOVE before committing */}} 2<pre>{{ printf "%#v" $myVariable }}</pre>

Check Data File Loading

bash
1# Verify data files exist and are valid YAML 2cat data/article-data/influxdb/influxdb3-core/articles.yml | head -20

Integration with CI/CD

Add to .lefthook.yml or pre-commit configuration:

yaml
1pre-commit: 2 commands: 3 hugo-template-test: 4 glob: "layouts/**/*.html" 5 run: | 6 timeout 20 npx hugo server --port 1315 2>&1 | grep -E "error|Error" && exit 1 || exit 0 7 pkill -f "hugo server --port 1315" 2>/dev/null

GitHub Actions Workflow

yaml
1- name: Test Hugo templates 2 run: | 3 npx hugo server --port 1315 & 4 sleep 10 5 curl -f http://localhost:1315/ || exit 1 6 pkill -f hugo

Quick Reference

ActionCommand
Test templates (runtime)npx hugo server --port 1315 2>&1 | head -50
Build only (insufficient)npx hugo --quiet
Check specific pagecurl -s -o /dev/null -w "%{http_code}" http://localhost:1315/path/
Stop test serverpkill -f "hugo server --port 1315"
Debug data access<pre>{{ printf "%#v" $var }}</pre>

Remember

  1. Never trust npx hugo --quiet alone - it only checks syntax
  2. Always run the server to test template changes
  3. Check error output first before declaring success
  4. Use isset and index for safe data access
  5. Hyphenated keys require index function - dot notation fails
  • api-docs/README.md — API documentation workflow, tags.yml format, overlays, generation pipeline
  • cypress-e2e-testing skill — E2E testing of UI components and pages
  • docs-cli-workflow skill — Creating/editing documentation content
  • ts-component-dev agent — TypeScript component behavior and interactivity
  • ui-testing agent — Cypress E2E testing for UI components

関連スキル

Looking for an alternative to hugo-template-dev or another community skill for your workflow? Explore these related open-source skills.

すべて表示

openclaw-release-maintainer

Logo of openclaw
openclaw

ローカライズされた概要: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
AI

widget-generator

Logo of f
f

ローカライズされた概要: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf

149.6k
0
AI

flags

Logo of vercel
vercel

ローカライズされた概要: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
ブラウザ

pr-review

Logo of pytorch
pytorch

ローカライズされた概要: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
開発者