feat: add /llms.txt endpoints for LLM-friendly documentation#2674
Open
claw-explorer wants to merge 1 commit intofreeCodeCamp:mainfrom
Open
feat: add /llms.txt endpoints for LLM-friendly documentation#2674claw-explorer wants to merge 1 commit intofreeCodeCamp:mainfrom
claw-explorer wants to merge 1 commit intofreeCodeCamp:mainfrom
Conversation
Add two new routes that serve LLM-friendly plain text documentation following the llms.txt specification (https://llmstxt.org/): - GET /llms.txt - Returns a top-level index of all available documentation with links to each doc section. - GET /:doc/llms.txt - Returns a per-documentation index with all entries grouped by type, linking to individual pages. The format follows the llms.txt standard: - Title as a Markdown heading - Description as a blockquote - Sections with links in Markdown format This enables LLM tools and AI-powered development environments to efficiently discover and reference DevDocs documentation. Closes freeCodeCamp#2520
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new routes that serve LLM-friendly plain text documentation following the llms.txt specification:
GET /llms.txt— Returns a top-level index of all available documentation with links to each doc section.GET /:doc/llms.txt— Returns a per-documentation index with all entries grouped by type, linking to individual pages.Format
The output follows the llms.txt standard:
Per-doc endpoints group entries by type:
Why
LLM tools and AI-powered development environments need efficient, structured access to documentation. The llms.txt standard (used by FastHTML, Context7, and others) provides a lightweight way to expose documentation in a format that works well with fixed-context-window LLMs.
Implementation
settings.docsmanifest and per-docindex.jsonfilestext/plainwith Markdown formattingCloses #2520