-
Notifications
You must be signed in to change notification settings - Fork 93
docs: add copy markdown button on the documentation pages #236
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: master
Are you sure you want to change the base?
Conversation
|
docs/src/lib/get-llm-text.ts
Outdated
| value: page.data.content, | ||
| }); | ||
|
|
||
| // note: it doesn't escape frontmatter, it's up to you. |
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.
can you remove this comment? feels ai
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.
yes, I copied that from fumadocs's codeblock in the past, will clean that.
|
Also some additional notes:
|
|
LGTM - just need to update our vercel config to run actions on forks |
Problem
Needed a way to quickly get the content of docs to enrich llm chat context.
Summary of Changes
Implemented the feature built-in in the Fumadocs https://fumadocs.dev/docs/ui/llms as the documentation site framework.
/libfrom thedocsproject prettier ignore as the files are not formattedBehind the scene
The way the feature is done is by leveraging Fumadocs' engine to generate .md route for each of the page on build time e.g: https://www.gillsdk.com/docs/guides/codama will be accompanied by an API route https://www.gillsdk.com/docs/guides/codama.mdx. This is a raw text of the parsed document that is LLM friendly.
Fumadocs also gave a way of doing https://www.gillsdk.com/llms-full.txt which generate complete raw documentation page in a single page/request to let LLMS have the full context of what is gill about.
With these ways of building and serving pages for LLM usage there are few concerns:
On the other hand these concerns might not be worth worrying about, as static pages are lightweight and require minimal resources.
Screenshots
copy markdown button and chat links on docs
copy markdown button on api reference
mobile view
Fixes #
#235