[FEATURE](llms) Add docusaurus-plugin-llms and validation tests#367
Conversation
Register docusaurus-plugin-llms in docusaurus.config.js and enable generation of llms.txt, llms-full.txt and a custom llms-schema.txt (with options like excludeImports, includeBlog, includeOrder and ignoreFiles). Update README to document the new LLM-friendly output files and their URLs. Add the plugin dependency to package.json (and update lockfile). Add Vitest-based post-build tests (src/__tests__/llms-output.test.js) to validate the presence and basic content/format of the generated LLM files. Signed-off-by: John McCall <john@overturemaps.org>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
🗺️ OMF Docs previews are live!
Auto-gen schema site is now available. This is an early preview of a future workflow where we will automatically generate and publish reference docs for the Overture Maps Format schema with every change to the schema repo. Note ♻️ This preview updates automatically with each push to this PR. |
There was a problem hiding this comment.
Pull request overview
Adds LLM-oriented build artifacts to the Docusaurus docs site by integrating docusaurus-plugin-llms, plus introduces a Vitest suite intended to validate the generated llms*.txt outputs and documents the new URLs in the README.
Changes:
- Register
docusaurus-plugin-llmsindocusaurus.config.jswith generation options and a customllms-schema.txt. - Add
docusaurus-plugin-llmsdependency (and lockfile updates). - Add Vitest “post-build” validation tests for
llms.txt,llms-full.txt, andllms-schema.txt, and document the outputs inREADME.md.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/__tests__/llms-output.test.js |
Adds validation tests for llms*.txt build outputs (currently relies on a non-portable path resolution + CI assumptions). |
package.json |
Adds docusaurus-plugin-llms dependency. |
package-lock.json |
Locks docusaurus-plugin-llms (and transitive deps) versions. |
docusaurus.config.js |
Configures docusaurus-plugin-llms generation options and custom schema-only output. |
README.md |
Documents the generated llms*.txt files and their production URLs (table formatting issue). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a 'Validate build output' step to the production docs workflow that runs `npm test` after the Docusaurus build to catch issues before deployment. Update the Vitest test to compute BUILD_DIR using `fileURLToPath(new URL(..., import.meta.url))` for proper ESM path resolution and remove the unused `resolve` import. Signed-off-by: John McCall <john@overturemaps.org>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Dana Bauer (danabauer)
left a comment
There was a problem hiding this comment.
Thanks, John.
Changes
Register docusaurus-plugin-llms in docusaurus.config.js and enable generation of:
Notes
The one-line summaries in
llms.txtare a bit of a mixed bag quality-wise - this is because we don't generally include adescriptionfront matter field. If we added them, this is what would feed directly intollms.txt. I believe this is worth doing, but is outside the scope of this PR due to the sheer size of files that would need updating (100+).