cbrst/nix
Workflows

This documentation

How this site is built, published, and kept up to date.

This site is built with Fumadocs on Next.js from docs/ and published to GitHub Pages.

Keeping it current

Two GitHub Actions workflows keep the site in step with the configuration:

  1. Docs sync (.github/workflows/docs-sync.yml) runs on every push to main that changes configuration, that is, anything outside docs/, .github/, and flake.lock. Claude Code reads the commits since the last sync, which is recorded in docs/.last-sync, including their messages and diffs. It checks them against the current source and revises the affected pages. The result is opened as, or added to, a single pull request on the docs/sync branch.
  2. Docs deploy (.github/workflows/docs-deploy.yml) builds the site and publishes it to GitHub Pages whenever docs/ changes on main, which includes merging the sync pull request.

The pages describe the configuration as it is now; they are not a changelog. The commit history remains the record of how it got there.

Because the sync branch is rebuilt from main on every run and docs/.last-sync only advances when the pull request is merged, an unmerged sync is never lost. The next run covers every commit since the last merge.

The sync agent's instructions are in .github/docs-sync-prompt.md. It authenticates with a Claude Code OAuth token (CLAUDE_CODE_OAUTH_TOKEN), so runs count against a Claude subscription instead of API billing.

Editing by hand

Pages are MDX files in docs/content/docs/. Each folder has a meta.json that sets its sidebar title and page order. The "Open" menu on every page links to its source on GitHub, and "Copy Markdown" copies the page for pasting into an AI chat. Hand edits are fine; the sync agent revises pages in place rather than regenerating them.

The site also publishes llms.txt and llms-full.txt, an index and a full-text dump of every page for AI tools.

Building locally

cd docs
nix shell nixpkgs#nodejs -c npm ci
nix shell nixpkgs#nodejs -c npm run dev     # live preview
nix shell nixpkgs#nodejs -c npm run build   # static export into docs/out

Last updated on

On this page