| name | add-llms-txt |
| description | Use to add LLM-friendly outputs to a Hugo site — /llms.txt and /llms-full.txt indexes plus a per-page markdown twin at <url>/index.md — generated from content so they stay in sync. Triggers "add llms.txt", "make the site agent-friendly", "markdown twin". |
Add llms.txt + markdown twins to a Hugo site
Never hand-edit public/ — these outputs are generated from content.
Workflow
-
Add the output formats + assignments to the site config (paste the verbatim block from this skill — copied from a working site):
[outputs]
home = ["HTML", "RSS", "JSON", "llms", "llmsfull"]
page = ["HTML", "markdown"]
[mediaTypes]
[mediaTypes."text/llms"]
suffixes = ["txt"]
delimiter = "."
[outputFormats]
[outputFormats.llms]
mediaType = "text/llms"
baseName = "llms"
isPlainText = true
rel = "alternate"
[outputFormats.llmsfull]
mediaType = "text/llms"
baseName = "llms-full"
isPlainText = true
rel = "alternate"
[outputFormats.markdown]
mediaType = "text/markdown"
baseName = "index"
isPlainText = true
rel = "alternate"
-
Copy the templates from this skill dir into the site's layouts/:
index.llms.txt → layouts/index.llms.txt
index.llmsfull.txt → layouts/index.llmsfull.txt
single.markdown.md → layouts/_default/single.markdown.md
Adjust section names ("posts", "talks") to the target site's content sections.
If the site has no canonical-URL field, the canonicalURL references are no-ops (.Params.canonicalURL returns empty string).
-
Customize index.llms.txt for the target site:
- Set
params.llmsIntro in hugo.toml/params.toml to a one-sentence site description for LLM crawlers — e.g. llmsIntro = "Technical writing on Kubernetes and platform engineering.".
If unset, the template falls back to "Content by <author.name>.".
- Set
params.author.bio for the About line, or edit the About section directly.
-
Advertise the twin: ensure the head partial emits <link rel="alternate" type="text/markdown" href="index.md">.
Congo does this automatically when rel = "alternate" is set on the output format.
Guardrails
- These outputs are generated — regenerate by rebuilding; never edit
public/.
- Allow AI crawlers in
robots.txt if you want them fetched (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, etc.).
- The
llms-full.txt template only iterates "posts" — if the target site uses a different section name, update the range filter.
Output
/llms.txt, /llms-full.txt, and per-page index.md twins, all build-generated.