docs: add copy markdown button on the documentation pages #236
+1,421
−882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
/lib
from thedocs
project 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