Skip to content

Conversation

@vincanger
Copy link
Contributor

Description

In order to make our Claude Code plugin more precise, we want to create versioned llms.txt docs as well, so that CC can get the correct docs depending on the user's wasp --version.

Type of change

  • 🔧 Just code/docs improvement
  • 🐞 Bug fix
  • 🚀 New/improved feature
  • 💥 Breaking change

Checklist

  • I tested my change in a Wasp app to verify that it works as intended.

  • 🧪 Tests and apps:

    • I added unit tests for my change.
    • (if you fixed a bug) I added a regression test for the bug I fixed.
    • (if you added/updated a feature) I added/updated e2e tests in examples/kitchen-sink/e2e-tests.
    • (if you added/updated a feature) I updated the starter templates in waspc/data/Cli/templates, as needed.
    • (if you added/updated a feature) I updated the example apps in examples/, as needed.
      • (if you updated examples/tutorials) I updated the tutorial in the docs (and vice versa).
  • 📜 Documentation:

    • (if you added/updated a feature) I added/updated the documentation in web/docs/.
  • 🆕 Changelog: (if change is more than just code/docs improvement)

    • I updated waspc/ChangeLog.md with a user-friendly description of the change.
    • (if you did a breaking change) I added a step to the current migration guide in web/docs/migration-guides/.
    • I bumped the version in waspc/waspc.cabal to reflect the changes I introduced.

Reworks the script to loop through all documentation versions and generate LLM files for each, removing redundant code and simplifying file output logic. The latest version now generates both llms.txt and llms-full.txt, while older versions generate llms-{version}.txt. Cleans up unused variables and functions, and improves maintainability.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 15, 2025

Deploying wasp-docs-on-main with  Cloudflare Pages  Cloudflare Pages

Latest commit: c9e5dbc
Status: ✅  Deploy successful!
Preview URL: https://f1053e5c.wasp-docs-on-main.pages.dev
Branch Preview URL: https://add-versioning-to-llms-txt.wasp-docs-on-main.pages.dev

View logs

Replaces the buildLlmsTxtContent function with a more concise implementation using template constants. Extracts file writing logic into dedicated writeLlmsTxtFile and writeLlmsFullTxtFile functions for better modularity and clarity.
@infomiho
Copy link
Member

Maybe it's good if we kept the llms.txt as docs for the latest version? So wasp.sh/llms.txt keep working :)

@vincanger
Copy link
Contributor Author

@infomiho it does keep llms.txt for latest. only older versions have the version url, e.g. wasp.sh/llms-0.18.0.txt

try:

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