docs: generate llms.txt from the runtime sidebar - #3430
Open
bartlomieju wants to merge 1 commit into
Open
Conversation
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.
llms.txt was the only agent-facing index still maintained by hand, and it had
drifted: it pointed at the pre-reorganisation docs structure, so
getting_started/first_project, fundamentals/testing and
fundamentals/linting_and_formatting all resolved through redirects, subhosting
pointed at a redirect too, and nine sections added since — including the whole
Migrating from Node guide — were never indexed at all. Hand maintenance means
this happens again after the next reorganisation.
So it is now derived from the runtime sidebar, which is the one structure that
cannot go stale unnoticed, because a wrong entry visibly breaks site
navigation. Descriptions come from each page's frontmatter, condensed to a
single sentence; the three build-generated trees that have no local frontmatter
carry an explicit description instead. Only top-level sidebar items are
emitted, since the CLI and standard library subtrees alone are about 90 pages
and belong in llms-full.txt rather than a curated index.
Scope is now the open-source runtime. Deno Deploy, Deno Sandbox and Subhosting
are complementary products with their own docs trees, and three links each was
enough to dilute the index without being useful for actually working on them,
so they get a single pointer apiece and stay one hop away.
llms_txt_test.ts fails if the committed file is stale or links to a page that
no longer exists, so
deno task testnow catches both failure modes thatproduced this drift.