valibot
valibot copied to clipboard
RFC: feat: add llms.txt generation
This adds generation of llms.txt, which is used there and there by various libraries, to expose API, documentationn, and information in format, which is easier to be consumed by LLMS. Not yet de-facto standard. Before merging however, would probably be good to agree on a format.
Right now it just strips frontmatter (subject to change/discussion) MDX's imports and trims empty space at start and end of each Markdown file. As a minimum, probably, worth to include description from frontmatter in each section. (Using some AST manipulation would be much more effecient though probably)
More here :https://llmstxt.org/ Example in the wild: https://hono.dev/llms-full.txt, https://sdk.vercel.ai/llms.txt
@muningis is attempting to deploy a commit to the Valibot Team on Vercel.
A member of the Team first needs to authorize it.
Thank you so much for this contribution! I will try to review it this week and provide feedback.
Sorry for the delay. I will get back to this PR as soon as possible, but it may take one or two weeks.
I plan to review this PR in the next few days.
I will take over this PR and try to finalize it in the next few days
The llms.ts script is ready! 🔥 Next, I will add a llms.txt guide to our dosc.
I've merged it, but feel free to review my script if you're interested.