Add /llms.txt to docs for LLM context#3194
Conversation
✅ Deploy Preview for tauri-v2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
This is great. What is needed to get it merged? |
| @@ -0,0 +1,53 @@ | |||
| import { getCollection } from "astro:content"; | |||
| import type { APIRoute } from "astro"; | |||
| import { doc } from "prettier"; | |||
There was a problem hiding this comment.
is doc being used? if so, isn't it confliting in lines 39 and 40? (if you can't get back to it right now, let me know and I'll take care myself)
There was a problem hiding this comment.
Sorry for the delayed reply, the PR fell off my radar.
You're absolutely correct. I believe this was an unintentional auto import that I didn’t notice.
Will remove it.
|
oh man I'm sorry, I intended to review this right when it was open but didn't. Thanks for this work, I hope we can merge this already. |
|
@watzon in the meanwhile you can see the preview, for instance https://deploy-preview-3194--tauri-v2.netlify.app/llms.txt |
jeremygiberson
left a comment
There was a problem hiding this comment.
Remove unnecessary import
|
thank you |

Description
I ran this #3144 this morning when I wanted tauri docs in my RAG. Since I was already yak shaving I decided to lend a hand for this feature. I would by no means call this ready to go -- it's just a little push. This was my first time working with Astro so I'm kind of just winged it figuring out how to do it w/ disregard to whether I should in this particular way.
Ultimately I created 3 endpoints
src/pages/llms.txt.ts->/llms.txtsupplies minimum functionality of generating an LLM friendly documentsrc/pages/llms.toc.txt.ts->/llms.toc.txtserves as a directory listing of all the various documentation topics with a link to a full llms.txt for just the specified category.src/page/[...llm_slug].ts->/<some>/<content_slug>/llms.txtrenders the llms.txt for just the specified documentation. Mirrors the existing content slugs and appends/llms.txtto it. Ie,/security/scope/now has a matching/security/scope/llms.txt.My thoughts on 2 and 3 is to support a model or rag workflow that supports reasoning and fetching then it might be happy to start with an index and figure out where it can grab more docs that it cares about. I don't know how practical it is. /shrug