Decision support comes first. Repository text comes second.
Reference-Only Page Review Score: 3/11
This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.
Quality floor passed for review
Review Score
3/11
Quality Score
70
Canonical Locale
en
Detected Body Locale
en
InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux.
核心价值
InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux.
适用 Agent 类型
Suitable for operator workflows that need explicit guardrails before installation and execution.
↓ 赋予的主要能力 · hugo-template-dev
! 使用限制与门槛
Why this page is reference-only
- Current locale does not satisfy the locale-governance contract.
- The page lacks a strong recommendation layer.
- The page lacks concrete use-case guidance.
- The page lacks explicit limitations or caution signals.
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.
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
安装 hugo-template-dev,这是一款面向AI agent workflows and automation的 AI Agent Skill。查看评审结论、使用场景与安装路径。
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/:
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
1timeout15 npx hugo server --port13152>&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 := "" }}
56 {{/* Safely extract values */}}
7 {{ if isset $item "path" }}
8 {{ $path = index $item "path" }}
9 {{ end }}
1011 {{ if $path }}
12 {{/* Now safe to use $path */}}
13 {{ end }}
14{{ end }}