Skip to content

Documentation site ​

Put repository-wide guides in docs/ and component guides beside the component they explain. The site builds its navigation from those files and their metadata, then generates API references from source comments and action metadata. This guide shows where pages belong, how to organize them, and how to preview and publish the site.

Choose where a page belongs ​

Direct children of docs/ are guides and appear under /guides/. Put reference pages in a folder, such as docs/plugin-api/setup-and-build.md, and they appear under /docs/ with their folder structure. A nested index.md is the landing page for its folder. The repository home and Team page are exceptions: docs/index.md renders at /, and docs/team.md renders at /team. Neither is listed in the Guides or Docs catalog. Instructions for coding agents in docs/agents/ stay in the repository and are not published.

For a plugin, put component-specific pages in packages/<plugin>/docs/; tools, actions and VS Code extensions use the same layout in their own folders. The site adds those pages to the component sidebar. If you create docs/index.md, it becomes the component's landing page and the README remains available as a separate README entry. Otherwise, the README is the overview when one exists; if it doesn't, the first docs page is used.

Write links from component docs to repository docs as relative Markdown links. pnpm check checks relative links, and the site rewrites those links to their site routes during the build. Source files and folders have no page on the site, so the build points relative links to them at GitHub. The build fails if a link points to a Markdown page the site doesn't publish, such as the root README or a benchmark page. Link a published page that covers the same ground, or use the file's GitHub URL.

Set page titles and navigation ​

Use frontmatter to control how a page appears in menus and sidebars:

  • title sets the menu and sidebar label. Without it, the first H1 is used; if there isn't one, the filename supplies the label.
  • description supplies the short summary shown in menus and catalogs. Without it, the site derives a summary from the first prose paragraph.
  • navigation.category groups direct-child guides. For nested docs, folders determine the groups; the nested index.md title labels its folder. Without an index, a category shared by the folder's pages can label it; otherwise, the site uses a readable version of the folder name.
  • navigation.type accepts link, card, or spotlight. Pages are regular links by default; use card or spotlight when the page needs more visual emphasis.
  • On a component doc, navigation.catalog: true also lists the page in the repository-level Docs menu and catalog. It remains in the component sidebar.

Component menu settings belong in a docs.yml file at the component root, next to docs/:

yaml
navigation:
    category: Compatibility
    type: card
    icon: artwork/plugin-mark.svg

category is optional; without it, the item stays in its default Plugins, Tools, or Actions group. VS Code extensions appear in the Tools menu, in a VS Code extensions group by default. type defaults to a regular link and can be set to card or spotlight. An icon path is relative to the component root. If you omit it—or the configured file doesn't exist—the site looks for icon.svg, icon.png, icon.webp, logo.svg, logo.png, or logo.webp first in the component root and then in docs/. The icon appears in navigation and beside the title on the component landing page.

To feature a plugin in the desktop Plugins menu, set navigation.featured: true on its docs/index.md. The menu has one featured-plugin area; the plugin remains in its normal category as well. The featured card uses the page title and package description. It uses the card style by default; set navigation.type: spotlight to make it a wide row.

The generated docs/README.md contains the Guides and Docs catalog; its introduction stays hand-written. Page metadata and folder names supply the catalog labels, while the root pages remain omitted. Run pnpm readme to refresh the catalog and generated README sections, or pnpm readme:check to check for drift without writing.

The reference block in a component README is also generated by pnpm readme. Its API URL comes from the component's discovered path, and a component guide link is added when docs/index.md exists. The public documentation base comes from the repository URL in the root package.json. Keep the generated markers in place and change the source metadata or docs files instead of maintaining those links by hand.

Add API documentation at its source ​

The API build generates pages from documented exports in plugin and tool source, action inputs and outputs in each action definition (action.yml or action.yaml), VS Code extension source, and exported repository script helpers. TypeDoc scans whole source folders, including implementation modules. excludeNotDocumented keeps symbols without JSDoc out of the reference; it doesn't check that every public API is documented. The JSDoc lint checks descriptions on exported TypeScript APIs.

Generated Pumpkin and WASI bindings can appear by name in public signatures, but their declarations aren't included as reference pages. The build generates the bindings before it runs TypeDoc. The generated API pages are build output and ignored by Git, so edit source comments, action metadata, or typedoc.json rather than editing those pages.

VitePress adds an Edit this page on GitHub link to Markdown pages. Generated API pages link to a corresponding source file when TypeDoc can identify one. The Last updated date comes from Git history; the docs workflow fetches full history so it can show the latest edit time for each page.

Keep generated site details in mind ​

The site creates /llms.txt during the build from discovered guides, component docs, package and action metadata, and API references. Links to guides and component docs point to raw Markdown in the repository; API links point to the published docs site. The development server serves the same content at /llms.txt. Update source docs or metadata to change its entries, and docs/.vitepress/llms.mts to change its structure.

The Team page fetches all pages of contributor data from GitHub during builds and development, so the build needs network access and fails if GitHub is unavailable. It excludes bot accounts. Avatars, profile links, and contribution counts also come from GitHub, so there is no contributor list to maintain. If unauthenticated requests are rate limited, set GITHUB_TOKEN locally; the docs workflow supplies a read-only token. With a token, each contributor-list page can make at most one GraphQL request to look up public profile names. Without a token, or if name lookup fails, cards show GitHub usernames. The token and data loader aren't published with the cards.

The repository owner, taken from the repository URL in the root package.json, gets an Owner label and is sorted first; other contributors are sorted by contribution count. GitHub may take time to refresh those counts.

Plugin and action landing pages, READMEs, and API overview pages show native VitePress version badges. A badge reads its version from the package manifest or action version file. It links to a release only when the matching tag is present in the checkout. Release configuration supplies the tag name, and the workflow fetches tags with the full checkout.

Preview, build, and publish ​

While editing, run pnpm run dev:docs to generate the API pages and start the VitePress development server. To preview the last production build instead, run pnpm run docs:preview.

Build the complete site with pnpm run docs. It generates bindings, builds the API references, then builds the VitePress site. Bindings come from one Turbo typecheck run over plugin-kit, update-check, pumpkin-api, codemod and every plugin, so Turbo builds the plugin builder CLI first and a fresh clone needs no separate build step. TypeDoc runs before VitePress because the site reads its generated pages. pnpm run docs:build runs the same complete production build.

You can run the pipeline in stages: pnpm run docs:types generates binding declarations, pnpm run docs:api runs that step and then generates the API reference, and pnpm run docs:site builds the site from the generated pages. To generate one package's declarations, run pnpm turbo run typecheck --filter=<package>.

The .github/workflows/docs.yml workflow checks documentation on pull requests and publishes after pushes to master or main. It deploys a GitHub Pages artifact and mirrors the built files to the gh-pages branch. Set the repository's Pages source to GitHub Actions.

pumpkin-plugins documentation