Skip to content

Commit 0b922a7

Browse files
Broaden llms.txt and llms-full.txt to index all public sections (DOCS-98) (#3708)
## What and why `layouts/index.txt` renders `llms.txt`, the index an AI crawler reads to discover Chainguard docs. It ranged over only four hardcoded sections -- `chainguard`, `open-source`, `software-security`, `compliance` -- so every page outside them was invisible to those crawlers. That silently dropped the largest section on the site (`platform`, 300+ pages), `get-started`, and the root-level MCP server and Developer Resources pages. Adding a new section later would reopen the same gap without anyone noticing. Fixes DOCS-98. ## Changes - **`layouts/index.txt`** -- range over every section with `GroupBy "Section"` instead of naming four, so new sections are indexed automatically. Root-level pages group under a "General Resources" heading. - **Exclusion filter** -- skip any page the site already hides, via `seo.robots: noindex` or `sitemap_exclude: true`. This keeps `llms.txt` consistent with the site's own indexing signals. - **`layouts/index.fulltxt.txt`** (renders `llms-full.txt`) -- apply the identical section loop and exclusion filter so the two templates stay in lockstep for future edits. Also fixes a latent bug: a two-variable `GroupBy` range printed numeric section headers instead of names. - **`content/vulnerabilities/index.md`** -- mark the legacy 2020 "Vulnerability Information" page `sitemap_exclude: true`, dropping it from the sitemap and both AI indexes. ## Verification Built locally with the vendored Hugo and inspected the generated `public/`: - `llms.txt`: eight section headings including Platform, Get Started, the MCP server, and Developer Resources; `noindex` and `sitemap_exclude` pages absent. - `llms-full.txt`: same coverage and exclusions; section headers now show names, not numbers. - `sitemap.xml`: the legacy vulnerabilities page absent. ## Notes `contributors/` does not appear in either index -- those are author-profile `_index.md` section pages, not `RegularPages`. DOCS-101 tracks removing that section entirely. --- Created in collaboration with Claude Code running Claude Opus 4.8 on 2026-08-05. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 48ec902 commit 0b922a7

3 files changed

Lines changed: 36 additions & 31 deletions

File tree

content/vulnerabilities/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title : "Vulnerability Information"
33
type: "article"
44
date: 2020-10-06T08:48:23+00:00
5-
lastmod: 2022-10-06T08:48:23+00:00
5+
lastmod: 2026-08-05T13:04:18+00:00
66
draft: false
77
images: []
88
weight: 100
99
toc: false
10+
sitemap_exclude: true
1011
---
11-

layouts/index.fulltxt.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@ Documentation: CC BY-SA 4.0 | Code Examples: Apache 2.0
88
---
99

1010
## Full Documentation
11-
12-
{{ range $section, $pages := .Site.RegularPages.GroupBy "Section" }}
13-
## Section: {{ $section | title }}
14-
15-
{{ range $pages.Pages }}
11+
{{ range .Site.RegularPages.GroupBy "Section" -}}
12+
{{- $section := .Key -}}
13+
{{- $heading := cond (eq $section "") "General Resources" ($section | replaceRE "-" " " | title) -}}
14+
{{/* Collect only pages the site wants advertised: skip anything marked noindex or excluded from the sitemap. */}}
15+
{{- $visible := slice -}}
16+
{{- range .Pages -}}
17+
{{- $robots := "" -}}
18+
{{- with .Params.seo }}{{ $robots = .robots | default "" }}{{ end -}}
19+
{{- $excluded := or (in $robots "noindex") (eq .Params.sitemap_exclude true) -}}
20+
{{- if not $excluded }}{{ $visible = $visible | append . }}{{ end -}}
21+
{{- end -}}
22+
{{- if $visible }}
23+
## {{ $heading }}
24+
25+
{{ range $visible }}
1626
### {{ .Title }}
1727

1828
URL: {{ .Permalink | replaceRE "/$" ".md" }}
@@ -26,4 +36,5 @@ Tags: {{ delimit .Params.tags ", " }}
2636
---
2737

2838
{{ end }}
29-
{{ end }}
39+
{{- end -}}
40+
{{- end }}

layouts/index.txt

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
# Chainguard Academy
22

33
> Documentation, tutorials, and resources for Chainguard products and software supply chain security.
4-
5-
## Chainguard Products
6-
7-
{{ range where .Site.RegularPages "Section" "chainguard" -}}
8-
- [{{ .Title }}]({{ .Permalink | replaceRE "/$" ".md" }}){{ with .Description }}: {{ . }}{{ end }}
9-
{{ end }}
10-
11-
## Open Source
12-
13-
{{ range where .Site.RegularPages "Section" "open-source" -}}
4+
{{ range .Site.RegularPages.GroupBy "Section" -}}
5+
{{- $section := .Key -}}
6+
{{- $heading := cond (eq $section "") "General Resources" ($section | replaceRE "-" " " | title) -}}
7+
{{/* Collect only pages the site wants advertised: skip anything marked noindex or excluded from the sitemap. */}}
8+
{{- $visible := slice -}}
9+
{{- range .Pages -}}
10+
{{- $robots := "" -}}
11+
{{- with .Params.seo }}{{ $robots = .robots | default "" }}{{ end -}}
12+
{{- $excluded := or (in $robots "noindex") (eq .Params.sitemap_exclude true) -}}
13+
{{- if not $excluded }}{{ $visible = $visible | append . }}{{ end -}}
14+
{{- end -}}
15+
{{- if $visible }}
16+
## {{ $heading }}
17+
18+
{{ range $visible -}}
1419
- [{{ .Title }}]({{ .Permalink | replaceRE "/$" ".md" }}){{ with .Description }}: {{ . }}{{ end }}
1520
{{ end }}
16-
17-
## Software Security
18-
19-
{{ range where .Site.RegularPages "Section" "software-security" -}}
20-
- [{{ .Title }}]({{ .Permalink | replaceRE "/$" ".md" }}){{ with .Description }}: {{ . }}{{ end }}
21-
{{ end }}
22-
23-
## Compliance
24-
25-
{{ range where .Site.RegularPages "Section" "compliance" -}}
26-
- [{{ .Title }}]({{ .Permalink | replaceRE "/$" ".md" }}){{ with .Description }}: {{ . }}{{ end }}
27-
{{ end }}
28-
21+
{{- end -}}
22+
{{- end }}
2923
## API Reference
3024

3125
- [Chainguard API (Combined)](https://edu.chainguard.dev/api.json): OpenAPI spec for all Chainguard API versions (JSON)

0 commit comments

Comments
 (0)