-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
feat(docs): generate llms.txt
and llms-full.txt
#6430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
This is the recommended spelling and usage from the [vitepress-plugin-llms][1] package. [1]: https://www.npmjs.com/package/vitepress-plugin-llms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the idea of adding llms.txt
and llms-full.txt
to our docs site! I think it would make AIs so much smarter when working with Mermaid!
But I am a bit worried about using a new library that doesn't have many users, and as a widely uses open-source project, we're a bit sensitive to supply-chain attacks.
Since you're the author of this lib, and you already seem to be doing all the good security practices (e.g. signed provenance statements on NPM), that's good to hear!
It will help to replace tsup
with plain old typescript
, so that the dist/index.js
file is easier to manually review when you make updates (and for such a small lib, minifying it won't reduce package sizes by much)!
I am also a bit worried about the markdown-title
dependency, since it has pretty much no downloads except for vite-plugin-llms
and was last updated 6 years ago. Could we maybe replace it with @mdit-vue/plugin-title
, which is what Vitepress uses?
I wonder if it makes sense to remove gray-matter
too and replace it with what Vitepress uses, see https://github.com/vuejs/vitepress/blob/35f36a96bb1cb34f7b2e1f1f3b26d26a9038ef8a/src/node/markdown/markdown.ts#L5-L8, just to make sure parsing is consistent with Vitepress.
It looks like you could even do import { createMarkdownRenderer } from 'vitepress'
and const md = await createMarkdownRenderer();
to use the exact markdown parser that Vitepress uses too!
Edit: I fixed the ESLint issues too, so hopefully this PR gets a ✔️
I'm minifying anyway |
I also won't replace tsup with typescript, tsup is very good |
Just yesterday I figured out how to process markdown, I thought my project was finally finished (since almost everything is ready), but now I seem to understand that I will have to rewrite the entire mechanism |
I just tried switching to |
📑 Summary
This PR adds the
vitepress-plugin-llms
plugin to the VitePress configuration, which automatically generates LLM-Friendly documentation for the websiteIt generates
llms.txt
,llms-full.txt
and an LLM-Friendly version of each page in.md
formatSee https://llmstxt.org
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.If you accept this PR - I suggest you post a news story on your X that the site https://mermaid.js.org/ now has documentation for LLMs and mention my plugin and me (@okineadev)