showcase/shell-docs/src/content/docs/(other)/contributing/docs-contributions.mdx
We move quickly and our docs sometimes lag the code, so contributions to the documentation site are very welcome.
The documentation site lives in showcase/shell-docs inside the CopilotKit monorepo. It is a Fumadocs site; the legacy Nextra docs/ tree is being phased out and is no longer the right place to author new content.
npm i -g pnpm@^9)pnpm install provides everything.First, fork the CopilotKit GitHub repository, then clone your fork:
git clone https://github.com/<your-username>/CopilotKit
cd CopilotKit
pnpm install
pnpm install at the repo root installs every package in the workspace and wires up the lefthook pre-commit hook (lint, format, test) — running it once is required before your first commit.
The shell-docs site is an Nx project (@copilotkit/showcase-shell-docs). Run it through Nx from the repo root:
nx run shell-docs:dev
The site is served at http://localhost:3003. If you prefer to run it from the package directory, cd showcase/shell-docs && pnpm dev works too — both go through the same script.
Documentation pages live under:
showcase/shell-docs/src/content/docs/
A few conventions to keep in mind:
title, description, icon, etc.) drives the sidebar and metadata.<Snippet> region pattern over hand-inlining code blocks. <Snippet> pulls real source from the showcase integrations under showcase/integrations/<framework>/... using region markers (e.g. // region:my-region … // endregion:my-region). This keeps every code sample tied to runnable demo code and lets us catch drift automatically. When in doubt, look at how an adjacent page references the same integration and follow that pattern.<PropertyReference> component to render the prop / parameter table. Match the style of an existing reference page in the same directory.Before pushing, the lefthook pre-commit hook will run lint, format, and tests on the affected projects via Nx. If anything fails, fix the issue and commit again — don't bypass the hook.
When you're happy with the result, push and open a PR against the CopilotKit/CopilotKit repo. Thank you for your contribution!
</Step> </Steps>If you need help with anything, please don't hesitate to reach out on Discord. There's a dedicated #contributing channel.