Skip to content

Commit 3869859

Browse files
authored
Merge pull request #23718 from dvdksn/llms-txt-fixes
llms txt fixes
2 parents 99272ba + 5a8fdb1 commit 3869859

File tree

4 files changed

+21
-29
lines changed

4 files changed

+21
-29
lines changed

hugo.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,6 @@ outputFormats:
6969
isPlainText: true
7070
mediaType: "application/json"
7171
notAlternative: true
72-
# robots.txt, see: layouts/index.robots.json
73-
robots:
74-
baseName: robots
75-
isPlainText: true
76-
mediaType: "text/plain"
77-
notAlternative: true
78-
# Markdown for LLMs, see layouts/_default/single.markdown.md
79-
Markdown:
80-
baseName: index
81-
mediaType: "text/markdown"
82-
isPlainText: true
83-
isHTML: false
84-
permalinkable: false
8572
# llms.txt
8673
llms:
8774
baseName: llms
@@ -101,10 +88,10 @@ outputs:
10188
- llms
10289
page:
10390
- html
104-
- Markdown
91+
- markdown
10592
section:
10693
- html
107-
- Markdown
94+
- markdown
10895

10996
languages:
11097
en:

layouts/_default/index.llms.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@
33
{{- $grouped := $sorted.GroupBy "Section" -}}
44

55
# Docker Documentation
6+
{{- range $grouped }}
67

7-
{{ range $grouped }}
88
## {{ humanize .Key }}
9-
{{ range .Pages }}
10-
- [{{ .Title }}]({{ .Permalink }}){{ end }}
11-
{{ end -}}
9+
{{- range .Pages }}
10+
{{- template "pageItem" . }}
11+
{{- end }}
12+
{{- end -}}
13+
14+
{{- define "pageItem" }}
15+
{{- if and .Title .Permalink }}
16+
- [{{ .Title }}]({{ .Permalink }})
17+
{{- with .Description }}: {{ chomp (replace . "\n" " ") }}{{- end }}
18+
{{- end }}
19+
{{- end }}

layouts/_default/list.markdown.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
{{ .Title }}
2-
3-
{{ .RawContent }}
4-
5-
{{ range .Pages }}
6-
- [{{ .Title }}](https://docs.docker.com{{ .RelPermalink }})
7-
{{ end }}
1+
# {{ .Title }}
2+
{{ .RenderShortcodes }}
3+
{{ range where .Pages "Permalink" "ne" "" }}
4+
- [{{ .Title }}]({{ .Permalink }})
5+
{{ end }}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
{{ .Title }}
2-
3-
{{ .RawContent }}
1+
# {{ .Title }}
2+
{{ .RenderShortcodes }}

0 commit comments

Comments
 (0)