Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ jobs:
--exclude "*" \
--include "*.pf_meta" \
--include "*.pf_fragment"
-
name: Set markdown Content-Type on llms.txt
if: ${{ env.DOCS_S3_BUCKET != '' }}
run: |
aws --region ${{ env.DOCS_AWS_REGION }} s3 cp \
s3://${{ env.DOCS_S3_BUCKET }}/llms.txt \
s3://${{ env.DOCS_S3_BUCKET }}/llms.txt \
--content-type="text/markdown" \
--metadata-directive="REPLACE"
-
name: Update Cloudfront config
if: ${{ env.DOCS_CLOUDFRONT_ID != '' }}
Expand Down
12 changes: 8 additions & 4 deletions hack/releaser/cloudfront-lambda-redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ exports.handler = (event, context, callback) => {
// If it's not a file, treat it as a directory
if (!hasFileExtension) {
if (wantsMarkdown) {
// Markdown files are flattened: /path/to/page.md not /path/to/page/index.md
uri = uri.replace(/\/$/, '') + '.md';
// Markdown files are flattened: /path/to/page.md not /path/to/page/index.md.
// Homepage has no flattened equivalent, so serve llms.txt as the
// agent-oriented markdown index of the site.
const stripped = uri.replace(/\/$/, '');
uri = stripped === '' ? '/llms.txt' : stripped + '.md';
} else {
// HTML uses directory structure with index.html
if (!uri.endsWith("/")) {
Expand All @@ -79,8 +82,9 @@ exports.handler = (event, context, callback) => {
}
request.uri = uri;
} else if (wantsMarkdown && uri.endsWith('/index.html')) {
// If requesting index.html but wants markdown, use the flattened .md file
uri = uri.replace(/\/index\.html$/, '.md');
// If requesting index.html but wants markdown, use the flattened .md file.
// Root index.html has no flattened equivalent, so serve llms.txt instead.
uri = uri === '/index.html' ? '/llms.txt' : uri.replace(/\/index\.html$/, '.md');
request.uri = uri;
}

Expand Down
2 changes: 2 additions & 0 deletions layouts/home.llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{{- $grouped := $sorted.GroupBy "Section" -}}

# Docker Documentation

> MCP endpoint for structured agent access: https://mcp-docs.docker.com/mcp
{{- range $grouped }}

## {{ humanize .Key }}
Expand Down
1 change: 1 addition & 0 deletions layouts/home.robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{{- if hugo.IsProduction -}}
User-agent: *
Disallow: /unassociated-machines/
Content-Signal: ai-train=yes, search=yes, ai-input=yes


Sitemap: {{ "sitemap.xml" | absURL }}
Expand Down
23 changes: 23 additions & 0 deletions static/.well-known/mcp/server-card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"serverInfo": {
"name": "llms-txt",
"version": "1.26.0",
Comment thread
dvdksn marked this conversation as resolved.
"description": "Official Docker documentation MCP server. Exposes a fetch_docker_docs tool that returns the docs.docker.com content index."
},
"transport": {
"type": "http",
"url": "https://mcp-docs.docker.com/mcp"
},
"capabilities": {
"prompts": {
"listChanged": false
},
"resources": {
"subscribe": false,
"listChanged": false
},
"tools": {
"listChanged": false
}
}
}
Loading