Skip to content

Commit 6fe2b11

Browse files
committed
Add markdown output for docs homepage
1 parent 705b5b4 commit 6fe2b11

5 files changed

Lines changed: 41 additions & 7 deletions

File tree

content/_index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,30 @@ keywords: Docker, documentation, manual, guide, reference, api, samples
55
aliases:
66
- /search/
77
---
8+
9+
Docker Documentation helps you learn Docker, install Docker products, and find
10+
reference material for everyday development and operations tasks.
11+
12+
## Browse docs by area
13+
14+
- [Get started](/get-started/): Learn Docker basics and core concepts.
15+
- [Guides](/guides/): Follow task-focused walkthroughs for common workflows.
16+
- [Manuals](/manuals/): Install, configure, and use Docker products.
17+
- [Reference](/reference/): Browse CLI, API, and file format documentation.
18+
19+
## Featured topics
20+
21+
- [Docker Hardened Images](/dhi/)
22+
- [Get started with Docker Sandboxes](/ai/sandboxes/get-started/)
23+
- [Docker Desktop overview](/desktop/)
24+
- [Install Docker Engine](/engine/install/)
25+
- [Dockerfile reference](/reference/dockerfile/)
26+
- [Docker Build overview](/build/)
27+
28+
## Common questions
29+
30+
- [How do I get started with Docker?](/get-started/docker-overview/)
31+
- [Can I run my AI agent in a sandbox?](/ai/sandboxes/get-started/)
32+
- [What is a container?](/get-started/docker-concepts/the-basics/what-is-a-container/)
33+
- [What are Docker Hardened Images?](/dhi/)
34+
- [Why should I use Docker Compose?](/compose/)

hack/releaser/cloudfront-lambda-redirects.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ exports.handler = (event, context, callback) => {
6969
if (!hasFileExtension) {
7070
if (wantsMarkdown) {
7171
// Markdown files are flattened: /path/to/page.md not /path/to/page/index.md.
72-
// Homepage has no flattened equivalent, so serve llms.txt as the
73-
// agent-oriented markdown index of the site.
72+
// The homepage markdown output remains at /index.md.
7473
const stripped = uri.replace(/\/$/, '');
75-
uri = stripped === '' ? '/llms.txt' : stripped + '.md';
74+
uri = stripped === '' ? '/index.md' : stripped + '.md';
7675
} else {
7776
// HTML uses directory structure with index.html
7877
if (!uri.endsWith("/")) {
@@ -83,8 +82,8 @@ exports.handler = (event, context, callback) => {
8382
request.uri = uri;
8483
} else if (wantsMarkdown && uri.endsWith('/index.html')) {
8584
// If requesting index.html but wants markdown, use the flattened .md file.
86-
// Root index.html has no flattened equivalent, so serve llms.txt instead.
87-
uri = uri === '/index.html' ? '/llms.txt' : uri.replace(/\/index\.html$/, '.md');
85+
// The homepage markdown output lives at /index.md.
86+
uri = uri === '/index.html' ? '/index.md' : uri.replace(/\/index\.html$/, '.md');
8887
request.uri = uri;
8988
}
9089

hugo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ outputFormats:
114114
outputs:
115115
home:
116116
- html
117+
- markdown
117118
- redirects
118119
- metadata
119120
- robots
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
{{- $path := strings.TrimSuffix "/" .RelPermalink -}}
2-
{{- printf "%s.md" $path | absURL -}}
1+
{{- if .IsHome -}}
2+
{{- absURL "/index.md" -}}
3+
{{- else -}}
4+
{{- $path := strings.TrimSuffix "/" .RelPermalink -}}
5+
{{- printf "%s.md" $path | absURL -}}
6+
{{- end -}}

layouts/home.markdown.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Docker Documentation
2+
3+
{{ .RenderShortcodes }}

0 commit comments

Comments
 (0)