Docs Contributor Guide
Prerequisites
Section titled “Prerequisites”- A clone of the docs repository (this site’s source).
- Node.js ≥ 20 and pnpm. The repository pins
pnpm@9.15.9inpackageManager.
Docs are Markdown/MDX under src/content/docs/, organized by audience:
getting-started/, users/, admin/, api/, troubleshooting/,
contributing/. Every page except the splash index.mdx needs all six
frontmatter fields:
---title: Creating Backupsdescription: One line saying what the page teaches.audience: # user, admin, developer — first entry is the primary audience - userfeatures: # one or more tags from the canonical vocabulary - backupssources: # repo paths whose changes should trigger review - catalyst-backend/src/routes/backups.tslast_verified: YYYY-MM-DD # bump only when you verify against source---Rules: task-oriented prose, one primary audience per page (the first
frontmatter entry — add more only when the task genuinely spans them), Catalyst
terminology (panel, node, server, template, allocation, task — never
reuse the Pterodactyl product name for a Catalyst server, and never call a server
a container or an instance; container only means the Docker/OCI runtime
object), and no invented flags, ports, or defaults.
AGENTS.md is
the authoritative contract — it holds the per-field requirements, the canonical
30-tag features vocabulary that scripts/validate-docs.mjs enforces, and the
aside syntax (:::note[Title], no space after :::; kinds note, tip,
caution, danger). A new page also needs a sidebar entry in
astro.config.mjs; the sidebar is nested (Starlight items: groups) and nesting
does not change URLs.
Validate
Section titled “Validate”pnpm installpnpm dev # preview at http://localhost:4321pnpm validate # links, slugs, frontmatter, features, assets, OpenAPI, terminologypnpm test # docs-agent unit testspnpm run build # the same command Cloudflare Pages runsThe checks are plain Node scripts, runnable without the pnpm aliases:
node scripts/validate-docs.mjs # pnpm validatenode scripts/check-terminology.mjs # pnpm check-terminologynode scripts/sync-openapi.mjs --checkFix every failure — CI runs pnpm validate --strict on every pull request, which
also turns an orphan page (one no sidebar entry reaches) into a failure.
API reference
Section titled “API reference”Never hand-edit api/openapi.json or public/openapi.json. Regenerate from a
Catalyst checkout (--from-checkout runs that repo’s openapi:export script and
refreshes the served copy):
node scripts/sync-openapi.mjs --from-checkout ../catalystCommit the result. The Scalar viewer (api/reference) renders whatever is
committed, and --check fails when public/openapi.json drifts from
api/openapi.json.
The docs agent
Section titled “The docs agent”For larger sync work, run the docs agent (tools/docs-agent/) in audit, diff,
feature, validate, or api mode. It maps Catalyst changes to affected pages:
pnpm docs-agent audit --source-repo ../catalyst --docs-repo .pnpm docs-agent diff --source-repo ../catalyst --docs-repo . \ --base origin/main --head HEAD --dry-rundiff and feature write proposed changes into the working tree without
committing; --dry-run writes nothing. Details in its README.
Publish
Section titled “Publish”Merge to main → Cloudflare Pages builds and deploys to docs.catalystctl.com.
Pull requests get preview deployments. Deployment details: DEPLOYMENT.md.
Related
Section titled “Related”- API reference — the generated endpoint reference this page regenerates.
- Catalyst repository — the product source the docs describe.
