Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add llms.txt support #378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add llms.txt support #378

wants to merge 1 commit into from

Conversation

mahansky
Copy link

This PR aims to add support for the /llms.txt and /llms-full.txt files
Example of other sites implementing this standard: https://llmstxt.site/

There are three main changes:

  • every docs page has an optional .md suffix, which returns the markdown version of that page (ex. /docs/11.x/artisan.md)
  • /docs/{version}/llms.txt returns an index of all subpages (basically a sitemap for llms)
  • /docs/{version}/llms-full.txt returns markdown of all docs pages combined into one

Additionally there are two redirects from the root:

  • /llms.txt -> /docs/{version}/llms.txt
  • /llms-full.txt -> /docs/{version}/llms-full.txt

Before markdown is returned it goes through a few changes:

  • relative links to /docs are converted to absolute urls ending in .md
  • named anchors are removed
  • torchlight annotations are removed
  • table of contents is removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant