Skip to content

Commit b299a17

Browse files
committed
chore: improve main llms.txt entrypoint
Make it shorter, only highlight main landing pages Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 6fe2b11 commit b299a17

1 file changed

Lines changed: 71 additions & 12 deletions

File tree

layouts/home.llms.txt

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,81 @@
1-
{{- $pages := where site.RegularPages "Params.sitemap" "!=" false -}}
2-
{{- $sorted := sort $pages "RelPermalink" -}}
3-
{{- $grouped := $sorted.GroupBy "Section" -}}
1+
{{- $home := site.Home -}}
2+
{{- $manuals := site.GetPage "/manuals" -}}
3+
{{- $getStarted := site.GetPage "/get-started" -}}
4+
{{- $reference := site.GetPage "/reference" -}}
45

56
# Docker Documentation
67

8+
{{ with $home.Description -}}
9+
{{ chomp (replace . "\n" " ") }}
10+
{{- else -}}
11+
Docker Documentation is the official documentation site for Docker products,
12+
including Docker Desktop, Docker Engine, Docker Build, Docker Compose, Docker
13+
Hub, Docker Scout, and Docker AI features.
14+
{{- end }}
15+
16+
Use this file as a generated discovery guide for the docs site. For the complete
17+
page index, use [llms-full.txt](https://docs.docker.com/llms-full.txt).
18+
719
> MCP endpoint for structured agent access: https://mcp-docs.docker.com/mcp
820
> Bulk text corpus for offline indexing: https://docs.docker.com/llms-full.txt
9-
{{- range $grouped }}
1021

11-
## {{ humanize .Key }}
12-
{{- range .Pages }}
13-
{{- template "pageItem" . }}
22+
## Primary sections
23+
24+
{{- range sort (where site.Sections "Title" "!=" "") "Weight" }}
25+
{{- if not (in (slice "includes" "tags") .Section) }}
26+
- [{{ .LinkTitle | default .Title }}]({{ .Permalink }}): {{ with .Description }}{{ chomp (replace . "\n" " ") }}{{ else }}{{ .Title }} documentation.{{ end }}
27+
Markdown: {{ partial "utils/markdown-url.html" . }}
28+
{{- end }}
29+
{{- end }}
30+
31+
{{ with $getStarted }}
32+
## Starter paths
33+
34+
{{- range index .Params "get-started" }}
35+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
36+
{{- end }}
37+
{{- range index .Params "get-started2" }}
38+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
39+
{{- end }}
40+
{{- end }}
41+
42+
{{ with $manuals }}
43+
## Product documentation
44+
45+
{{- range .Params.sidebar.groups }}
46+
{{- $group := . }}
47+
{{- $items := index $manuals.Params ($group | anchorize) }}
48+
{{- with $items }}
49+
50+
### {{ $group }}
51+
{{- range . }}
52+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
53+
{{- end }}
54+
{{- end }}
55+
{{- end }}
56+
{{- end }}
57+
58+
{{ with $reference }}
59+
## Reference entry points
60+
61+
### File formats
62+
{{- range .Params.grid_files }}
63+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
64+
{{- end }}
65+
66+
### Command-line interfaces
67+
{{- range .Params.grid_clis }}
68+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
1469
{{- end }}
15-
{{- end -}}
1670

17-
{{- define "pageItem" }}
18-
{{- if and .Title .Permalink }}
19-
- [{{ .Title }}]({{ .Permalink }})
20-
{{- with .Description }}: {{ chomp (replace . "\n" " ") }}{{- end }}
71+
### APIs
72+
{{- range .Params.grid_apis }}
73+
- [{{ .title }}]({{ .link | absURL }}): {{ .description }}
2174
{{- end }}
2275
{{- end }}
76+
77+
## Retrieval guidance
78+
79+
- Prefer section landing pages above for navigation and scope selection.
80+
- Use [llms-full.txt](https://docs.docker.com/llms-full.txt) when you need the complete documentation corpus.
81+
- Use page-level markdown routes such as `https://docs.docker.com/engine/install.md` for clean per-page retrieval.

0 commit comments

Comments
 (0)