mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
23997fffc2
## What does this PR do? Makes `/learn` behave like `/reference` in the docs site: when a user is under `/learn`, the framework picker disappears and the sidebar shows only learn content. ### Changes - **Add `learn` to root `meta.json`** — the learn folder was missing from the root navigation, so `ConditionalSidebar` couldn't find it in the page tree and was falling through to the default sidebar (with the framework picker still visible). Adding it to the pages list mirrors how `reference` is wired up. - **New `LearnHeader` component** — static header with a book icon and "Learn" label, styled to match the Reference version selector. Wired in via `Sidebar`'s existing `headerSlot` prop on `/learn` routes. - **Rename learn index title to "Overview"** — the landing page that shows when you click the Learn tab now reads "Overview" in both the page heading and the sidebar. - **Drop the redundant `h-6` spacer in `Sidebar`** — every header component (`IntegrationSelector`, `VersionSelector`, `LearnHeader`) already has its own `mb-3`. The extra spacer was producing a 24px phantom gap on `/learn` while collapsing to 0 on `/reference` under flex shrink, so the two sidebars looked inconsistent. ### Verification Tested locally on the docs dev server: | Route | Sidebar header | Sidebar contents | Framework picker | |-------|---------------|------------------|------------------| | `/` | Integration selector | Full docs tree | shown | | `/reference/v2` | API version selector | Reference v2 tree | hidden | | `/learn` | New "Learn" header | Learn-only tree | hidden | | `/learn/architecture` | New "Learn" header | Learn-only tree (Architecture active) | hidden | Spacing between the header and first sidebar item is now equal across `/learn` and `/reference`. ## Related PRs and Issues - N/A ## Checklist - [x] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md) - [x] If the PR changes or adds functionality, I have updated the relevant documentation - [x] "Allow edits by maintainers" is checked 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fumadocs-test
This is a Next.js application generated with Create Fumadocs.
Run development server:
npm run dev
# or
pnpm dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
Learn More
To learn more about Next.js and Fumadocs, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Fumadocs - learn about Fumadocs
Vercel Deployment with Git LFS
Docs assets are tracked with Git LFS. To ensure production builds always receive
real asset bytes (not pointer files), deploy docs through GitHub Actions using
.github/workflows/deploy_docs_vercel.yml.
Required GitHub repository secrets:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID_DOCS
PR previews:
.github/workflows/deploy_docs_vercel_preview.ymldeploys docs previews for non-fork pull requests.- The workflow posts/updates a sticky PR comment with a clickable
Open Docs Previewlink.
Recommended Vercel project setting:
- Disable automatic Git-based deployments for the docs project and let the GitHub Actions workflow handle production deploys.