Skip to content

[FEATURE](llms) Add docusaurus-plugin-llms and validation tests#367

Merged
John McCall (lowlydba) merged 2 commits intomainfrom
324-action-item-create-a-publicly-available-text-file-of-our-docs-for-the-bots-to-eat
Apr 29, 2026
Merged

[FEATURE](llms) Add docusaurus-plugin-llms and validation tests#367
John McCall (lowlydba) merged 2 commits intomainfrom
324-action-item-create-a-publicly-available-text-file-of-our-docs-for-the-bots-to-eat

Conversation

@lowlydba
Copy link
Copy Markdown
Contributor

@lowlydba John McCall (lowlydba) commented Apr 28, 2026

Changes

Register docusaurus-plugin-llms in docusaurus.config.js and enable generation of:

Notes

The one-line summaries in llms.txt are a bit of a mixed bag quality-wise - this is because we don't generally include a description front matter field. If we added them, this is what would feed directly into llms.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+).

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>
@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JAVASCRIPT_ES Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
SQLFLUFF Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

🗺️ OMF Docs previews are live!

🆕 Auto-gen schema site (beta) https://staging.overturemaps.org/docs/pr/367/index.html
🗂️ Auto-gen schema ref dev@201637c
🌍 Repo schema site https://staging.overturemaps.org/docs/pr/367-no-autogen/index.html
🕐 Updated Apr 28, 2026 18:25 UTC
📝 Commit 22ab74f

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.
The auto-gen schema site may contain incomplete or inaccurate information as we are still refining the generation process, so please compare against the repo schema site and refer to the linked commit for the most up-to-date source of truth.

Note

♻️ This preview updates automatically with each push to this PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-llms in docusaurus.config.js with generation options and a custom llms-schema.txt.
  • Add docusaurus-plugin-llms dependency (and lockfile updates).
  • Add Vitest “post-build” validation tests for llms.txt, llms-full.txt, and llms-schema.txt, and document the outputs in README.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.

Comment thread src/__tests__/llms-output.test.js Outdated
Comment thread src/__tests__/llms-output.test.js
Comment thread README.md
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>
@github-actions
Copy link
Copy Markdown

Super-linter summary

Language Validation result
JAVASCRIPT_ES Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
SQLFLUFF Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Copy link
Copy Markdown
Collaborator

@danabauer Dana Bauer (danabauer) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, John.

@lowlydba John McCall (lowlydba) merged commit fcacb3b into main Apr 29, 2026
18 checks passed
@lowlydba John McCall (lowlydba) deleted the 324-action-item-create-a-publicly-available-text-file-of-our-docs-for-the-bots-to-eat branch April 29, 2026 13:21
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.

3 participants