Skip to content

Conversation

indralukmana
Copy link

@indralukmana indralukmana commented Sep 3, 2025

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.

  • updated the documentation site dependencies as needed by the Fumadocs feature
  • setup the routing for raw markdown txt
  • add the components for the copy markdown and link to chat services. NOTE: the api references only have copy markdown as the docs are generated from the Gill package and not available as github .mdx file
  • add full doc as llms-full.txt as in https://fumadocs.dev/docs/ui/llms#llms-fulltxt
  • removed /lib from the docs project prettier ignore as the files are not formatted

Behind 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:

  • I'm not sure about the hosting situation of the documentation site, the static pages generation would make the build time longer, should be fine if it is on Vercel but not sure if on other hosting
  • If gill docs became popular for AI/LLM the pages can be hit much more, maybe this would be a good thing but might be not, might be able to be solve with more fine grained caching system if we get there(?)

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 image
copy markdown button on api reference image
mobile view image

Fixes #

#235

Copy link

changeset-bot bot commented Sep 3, 2025

⚠️ No Changeset found

Latest commit: feb88c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@indralukmana indralukmana marked this pull request as ready for review September 4, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant