docs: add copy markdown button on the documentation pages#236
docs: add copy markdown button on the documentation pages#236indralukmana wants to merge 8 commits intogillsdk:masterfrom
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.
can you remove this comment? feels ai
There was a problem hiding this comment.
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