Skip to content

Commit b991da2

Browse files
Add to footer for side-wide llms.txt
1 parent 70385c1 commit b991da2

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

hugo.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ outputFormats:
8181
isPlainText: true
8282
isHTML: false
8383
permalinkable: true
84+
# llms.txt
85+
llms:
86+
baseName: llms
87+
isPlainText: true
88+
mediaType: "text/plain"
89+
notAlternative: true
90+
permalinkable: false
8491

8592
# Enable custom output formats
8693
# (only generate the custom output files once)
@@ -90,6 +97,7 @@ outputs:
9097
- redirects
9198
- metadata
9299
- robots
100+
- llms
93101
page:
94102
- html
95103
- Markdown

layouts/_default/index.llms.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- $pages := .Site.RegularPages -}}
2+
{{- $sorted := sort $pages "RelPermalink" -}}
3+
{{- $grouped := $sorted.GroupBy "Section" -}}
4+
5+
# Docker Documentation
6+
7+
{{ range $grouped }}
8+
## {{ humanize .Key }}
9+
{{ range .Pages }}
10+
- [{{ .Title }}]({{ .Permalink }}){{ end }}
11+
{{ end -}}

layouts/partials/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{{- with .GetPage "/contribute" }}
1111
<a class="underline-offset-2 hover:underline" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
1212
{{- end }}
13+
<a href="{{ "llms.txt" | relURL }}">Read llms.txt</a>
1314
</div>
1415
<hr class="text-divider-light dark:text-divider-dark" />
1516
<div class="grid lg:grid-cols-3 place-items-center gap-8 grid-cols-1">

0 commit comments

Comments
 (0)