Autogenerate llms.txt file (#2556)

* Auto-render llms.txt file

* Link to llms.txt from every index.md page

* Remove outdated llms-full.txt

* Link to skills and search from Markdownified page headers
This commit is contained in:
Abdon Pijpelink
2026-07-30 17:18:49 +02:00
committed by GitHub
parent 8c6de0a188
commit d3007ecc57
7 changed files with 39 additions and 73137 deletions
@@ -0,0 +1,19 @@
# {{ .Site.BaseURL }}
## Overall Summary
> {{ .Site.Params.description }}
{{ range .Site.Sections.ByWeight -}}
{{- $header := printf "\n## %s\n" .Title -}}
{{- range .RegularPagesRecursive.ByWeight -}}
{{- $include := true -}}
{{- if eq .Params.sitemapExclude true -}}{{- $include = false -}}{{- end -}}
{{- if .Sitemap.Disable -}}{{- $include = false -}}{{- end -}}
{{- with .Params.build -}}
{{- $render := .render | default "always" -}}
{{- if in (slice "never" "link") $render -}}{{- $include = false -}}{{- end -}}
{{- end -}}
{{- if and $include (ne .Title "") (ne .Permalink "") -}}
{{ $header }}{{- $header = "" -}}
- [{{ .Title }}]({{ .Permalink }}index.md): {{ with .Description }}{{ . | plainify | replaceRE "\\s+" " " | strings.TrimSpace }}{{ else }}{{ .Summary | plainify | replaceRE "\\s+" " " | strings.TrimSpace | truncate 200 "" }}{{ end }}
{{ end -}}
{{- end -}}
{{- end -}}