feat(handbook): add LLM-friendly documentation endpoints#54
Merged
Conversation
… routes - Replace __dirname with process.cwd() for ROUTES_DIR — import.meta.url resolves to .svelte-kit/output/ at prerender time, not src/ - Extract slugFromHref() helper to replace non-null assertions - Add explicit return types to entries() functions - Fix import ordering and formatting per Biome rules
- Remove redundant validation from [page].md route handler — readPageMarkdown validates internally - Use versions.map() instead of Set spread for explicit ordering - Add --- separator between pages in llms-full.txt for clearer boundaries
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
llms.txt,llms-full.txt, and.mdendpoints following the llms.txt proposal so LLMs can consume handbook documentation as raw markdownversions.tsandnavigation.ts; no user-supplied strings reach filesystem pathsEndpoints
/llms.txtllms.txt/{version}/llms.txt/{version}/llms-full.txt/{version}/{page}.mdTest plan
cd handbook && npm run build— no 404 warningsbuild/llms.txt,build/latest/llms.txt,build/latest/llms-full.txt,build/latest/state.mdall existdiff src/routes/latest/state/+page.md build/latest/state.mdshows no differencesnpx biome checkandnpx svelte-check— zero errors