Skip to content
Back to skills

Docs Site

ASecurity

Writing docs site pages, and keeping them in sync when a documented package changes

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 9, 2026
documentationtypescriptgoreactawsgitapi

Works with

  • vscode
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add JacobLey/leyman --skill docs-site --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs Site?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docs Site
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jacobley-docs-site/badge)](https://www.skillsdirectory.com/skills/jacobley-docs-site)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: docs-site
description: Writing docs site pages, and keeping them in sync when a documented package changes
---

<!-- @generated-signature v1:abb67ec8bada88ff0863b6e20a4aa803 Generated by docs/scripts/populate-docs.mjs (nx run @leyman/docs:populate-docs). Edit only inside manual sections. -->

<!-- @manual-start intro -->
# Docs Site

> Site: [`../../../docs/`](../../../docs/) · Setup and twoslash: [`docs/README.md`](../../../docs/README.md) · Deploy: [dagger-ci](../dagger-ci/SKILL.md#releasing)

The site is built with VitePress and deployed to GitHub Pages by CI on every push to `main`. Nothing to do per package beyond writing pages.

## Site layout

| Path | What |
|------|------|
| `/` | A router: the package categories and the demos, as cards. |
| `/packages/` | Every package, by category. Pages in `docs/src/packages/<package>/`. |
| `/demos/` | Every demo. Pages in `docs/src/demos/<demo>/`. |
| `/infrastructure/` | What the repository runs on (`infra/`), written up like demos. Pages in `docs/src/infrastructure/<slug>/`. |
| `/framework/` | This repository's setup as a framework another repository adopts. Single pages in `docs/src/framework/`, listed in `framework` in `projects.ts`. A page here is the source of a skill's text (the skill points to it), so it links to skills by GitHub URL. |
| `/llms.txt` | An index for AI agents ([llmstxt.org](https://llmstxt.org/)): every package, demo, infrastructure entry and framework page, with its pitch and links. Generated by `writeLlmsTxt` in `config.ts`; nothing to edit. |

[`docs/.vitepress/projects.ts`](../../../docs/.vitepress/projects.ts) lists every package (category, pitch, npm package paths, `related` packages, pages) and demo (pitch, source, `files` worth reading, packages it `uses`, `related` demos) once, and each infrastructure entry in the same shape as a demo (its `related` names other infrastructure). The nav, a sidebar per package and demo, previous/next links (kept within one package), the home page, the `/packages/` and `/demos/` lists, the generated blocks below, `/llms.txt`, and redirects from the old root-level package URLs are all built from it.

The build fails when the registry and the repo disagree: a pages directory with no entry, a slug naming nothing, a `sources`/`source`/`files` path that doesn't exist (so a rename can't silently break a GitHub link), or an overview page missing a generated block. Dagger leaves `.claude`, `.devcontainer`, `.github`, `.vscode` and `dagger` out of CI's source, so paths in those directories are only checked in a full checkout (`ciExcluded` in `config.ts`, kept in step with `New` in `dagger/main.go`): build locally before pushing.

Generated blocks, placed by hand on each overview page (`index.md`) so the markdown shows what renders:
- `<ProjectHeader />` right under the title. On a package: npm, source and changelog links. On a demo: its source, `files`, the packages it uses and related demos.
- `## Related` then `<ProjectRelated />` at the end of a package's overview: related packages (declared on either side) and the demos that use it. Required exactly when there is something to show.
<!-- @manual-end intro -->

## Documented packages

| Package                                                                    | Pages                                                                                             |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`aws-emulator-launch`](../../../tools/aws-emulator-launch/ts/)            | [`docs/src/packages/aws-emulator-launch/`](../../../docs/src/packages/aws-emulator-launch/)       |
| [`barrelify`](../../../apps/barrelify/)                                    | [`docs/src/packages/barrelify/`](../../../docs/src/packages/barrelify/)                           |
| [`entry-script`](../../../tools/entry-script/)                             | [`docs/src/packages/entry-script/`](../../../docs/src/packages/entry-script/)                     |
| [`generated-signature`](../../../tools/generated-signature/ts/)            | [`docs/src/packages/generated-signature/`](../../../docs/src/packages/generated-signature/)       |
| [`genever`](../../../apps/genever/ts/)                                     | [`docs/src/packages/genever/`](../../../docs/src/packages/genever/)                               |
| [`haywire`](../../../tools/haywire/)                                       | [`docs/src/packages/haywire/`](../../../docs/src/packages/haywire/)                               |
| [`haywire-launcher`](../../../tools/haywire-launcher/)                     | [`docs/src/packages/haywire-launcher/`](../../../docs/src/packages/haywire-launcher/)             |
| [`idempotency-keys`](../../../tools/idempotency-keys/ts/)                  | [`docs/src/packages/idempotency-keys/`](../../../docs/src/packages/idempotency-keys/)             |
| [`juniper`](../../../apps/juniper/)                                        | [`docs/src/packages/juniper/`](../../../docs/src/packages/juniper/)                               |
| [`juniper-arbitrary`](../../../apps/juniper-arbitrary/)                    | [`docs/src/packages/juniper-arbitrary/`](../../../docs/src/packages/juniper-arbitrary/)           |
| [`juniper-validator`](../../../apps/juniper-validator/)                    | [`docs/src/packages/juniper-validator/`](../../../docs/src/packages/juniper-validator/)           |
| [`lease-cache`](../../../tools/lease-cache/)                               | [`docs/src/packages/lease-cache/`](../../../docs/src/packages/lease-cache/)                       |
| [`load-populate-files`](../../../apps/populate-files/load-populate-files/) | [`docs/src/packages/populate-files/`](../../../docs/src/packages/populate-files/)                 |
| [`mocha-chain`](../../../tools/test-chain/mocha-chain/)                    | [`docs/src/packages/mocha-chain/`](../../../docs/src/packages/mocha-chain/)                       |
| [`normalized-react-query`](../../../tools/normalized-react-query/)         | [`docs/src/packages/normalized-react-query/`](../../../docs/src/packages/normalized-react-query/) |
| [`nx-lifecycle`](../../../apps/nx-lifecycle/)                              | [`docs/src/packages/nx-lifecycle/`](../../../docs/src/packages/nx-lifecycle/)                     |
| [`pg-dolly`](../../../tools/pg-dolly/)                                     | [`docs/src/packages/pg-dolly/`](../../../docs/src/packages/pg-dolly/)                             |
| [`pg-dolly-schema`](../../../apps/pg-dolly-schema/)                        | [`docs/src/packages/pg-dolly-schema/`](../../../docs/src/packages/pg-dolly-schema/)               |
| [`populate-files`](../../../apps/populate-files/ts/)                       | [`docs/src/packages/populate-files/`](../../../docs/src/packages/populate-files/)                 |
| [`unknown-error`](../../../tools/unknown-error/)                           | [`docs/src/packages/unknown-error/`](../../../docs/src/packages/unknown-error/)                   |
| [`vitest-chain`](../../../tools/test-chain/vitest-chain/)                  | [`docs/src/packages/vitest-chain/`](../../../docs/src/packages/vitest-chain/)                     |
| [`xenever`](../../../apps/xenever/)                                        | [`docs/src/packages/xenever/`](../../../docs/src/packages/xenever/)                               |

<!-- @manual-start demos -->
Demos ([`demos/`](../../../demos/)) each have a directory in [`docs/src/demos/`](../../../docs/src/demos/), whose `index.md` is generated from the demo's README (see [Generated pages](#generated-pages)). A demo made of several packages lists their READMEs in `readmes`, and each becomes a section of the page, like the OpenAPI demo's. A demo made of several runnable parts can be several demos that cross-reference through `related`, like the MCP server and the CLI:
<!-- @manual-end demos -->

| Demo                                                              | Page                                                                                                |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [`demos/blake3-wasm/`](../../../demos/blake3-wasm/)               | [`docs/src/demos/blake3-wasm/index.md`](../../../docs/src/demos/blake3-wasm/index.md)               |
| [`demos/blake3-go/`](../../../demos/blake3-go/)                   | [`docs/src/demos/blake3-go/index.md`](../../../docs/src/demos/blake3-go/index.md)                   |
| [`demos/read-through-cache/`](../../../demos/read-through-cache/) | [`docs/src/demos/read-through-cache/index.md`](../../../docs/src/demos/read-through-cache/index.md) |
| [`demos/sqs-job-queue/`](../../../demos/sqs-job-queue/)           | [`docs/src/demos/sqs-job-queue/index.md`](../../../docs/src/demos/sqs-job-queue/index.md)           |
| [`demos/webhook-receiver/`](../../../demos/webhook-receiver/)     | [`docs/src/demos/webhook-receiver/index.md`](../../../docs/src/demos/webhook-receiver/index.md)     |
| [`demos/outbox-relay/`](../../../demos/outbox-relay/)             | [`docs/src/demos/outbox-relay/index.md`](../../../docs/src/demos/outbox-relay/index.md)             |
| [`demos/openapi/`](../../../demos/openapi/)                       | [`docs/src/demos/openapi/index.md`](../../../docs/src/demos/openapi/index.md)                       |
| [`demos/agents/mcp/`](../../../demos/agents/mcp/)                 | [`docs/src/demos/mcp-server/index.md`](../../../docs/src/demos/mcp-server/index.md)                 |
| [`demos/fetch-middleware/`](../../../demos/fetch-middleware/)     | [`docs/src/demos/fetch-middleware/index.md`](../../../docs/src/demos/fetch-middleware/index.md)     |
| [`demos/agents/cli/`](../../../demos/agents/cli/)                 | [`docs/src/demos/agent-cli/index.md`](../../../docs/src/demos/agent-cli/index.md)                   |
| [`demos/local-ingress/`](../../../demos/local-ingress/)           | [`docs/src/demos/local-ingress/index.md`](../../../docs/src/demos/local-ingress/index.md)           |

<!-- @manual-start infrastructure -->
Infrastructure ([`infra/`](../../../infra/)) is documented the same way as demos, in [`docs/src/infrastructure/`](../../../docs/src/infrastructure/). The page is the narrative (what, how, why, cost); the `infra/` README stays the maintainer's runbook, and the page links to it rather than repeating the setup steps:
<!-- @manual-end infrastructure -->

| Infrastructure                                | Page                                                                                              |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`infra/nx-cache/`](../../../infra/nx-cache/) | [`docs/src/infrastructure/nx-cache/index.md`](../../../docs/src/infrastructure/nx-cache/index.md) |

<!-- @manual-start rest -->
**When you document a new package or demo, add an entry to [`docs/.vitepress/projects.ts`](../../../docs/.vitepress/projects.ts) (see [Site layout](#site-layout)), then run `nx run @leyman/docs:populate-docs`.** It regenerates the tables above, each package's `why.md` and each demo's page, the lists in the root README and `docs/README.md`, and the paths of [`.claude/rules/docs-site-sync.md`](../../../.claude/rules/docs-site-sync.md) (from each source's `src/`, README and `WHY-*.md`; add other paths in its manual section). **Point the package's `homepage` at its overview page, link that page from its README (see [writing-readmes](../writing-readmes/SKILL.md#links)), and add the package to `docs/package.json`'s `devDependencies` (`workspace:^`), which is how Nx hashes the README and changelog the build reads: the build checks all three. When a demo starts using a documented package, add it to the demo's `uses`.**

## Keeping pages in sync

Every change to a documented package's API, behavior, defaults, CLI flags or errors updates its pages **in the same commit**. A change that needs a [changeset](../versioning/SKILL.md) or a README update almost always needs a docs update too.

1. `grep -rn '<changed name>' docs/src/<package>/` to find every page that mentions what changed. Option tables, CLI tables and "Things to know" lists are easy to miss.
2. Update examples, tables and prose. Add the new feature where a reader would look for it (usually a guide and the reference page).
3. Build: `nx run @leyman/docs:build`.

The build catches some drift on its own: examples are type-checked against the package's built types, so a renamed export or changed signature fails it. It can't catch changed behavior, defaults, CLI flags, output shown in comments, or JSON examples, so read the pages rather than relying on a green build.

The README and the docs site cover the same API, so keep them consistent. Fix a mistake found in one in the other.

## Writing pages

Each package has the same layout. Follow an existing package (haywire is the fullest):

| Page | Contents |
|------|----------|
| `index.md` | `<ProjectHeader />`, a short introduction (the problem, then the package, as in the README: see [Prose](../writing-readmes/SKILL.md#the-introduction)), a short example, **Get started →**, Features (plain-sentence bullets, no bold labels), Compared to, `## Related` + `<ProjectRelated />` (when anything is related). |
| `getting-started.md` | Install (npm/pnpm/yarn `code-group`), the smallest working setup, Next steps. |
| `guides/*.md` | One topic each, for users who have the basics. |
| `reference/*.md` | Every option, flag and export, in tables. |
| `why.md` | Exactly when the package has a `WHY-<PACKAGE>.md`, and generated from it (see [Generated pages](#generated-pages)). |

- Every page has a `description` in frontmatter.
- Write plainly: see [Prose](../writing-readmes/SKILL.md#prose).
- Add each page to its package's `pages` in [`docs/.vitepress/projects.ts`](../../../docs/.vitepress/projects.ts), which builds the sidebar.
- Add a new package to `docs/package.json` `devDependencies` (`workspace:^`), so examples type-check against it and the site rebuilds when it changes.
- Link between pages with site paths (`/packages/haywire/guides/scopes`, `/demos/openapi/`), and to other documented packages' pages rather than npm. Dead links fail the build.
- Every `ts` block is type-checked. Use `// ---cut---` to hide setup, `// ^?` to show a type, and `// @errors: <code>` for an example that must fail. Use `// @noErrors` only for code that can't compile in isolation, like generated files that import their siblings.
- Use `json` or `sh` blocks for config and commands. They aren't checked, so where a config has a TypeScript type, also show it in a `ts` block with `satisfies` (see [nx-lifecycle's configuration](../../../docs/src/packages/nx-lifecycle/reference/configuration.md)).

## Generated pages

`nx run @leyman/docs:populate-docs` generates a package's `why.md` from its `WHY-<PACKAGE>.md`, and a demo's `index.md` from its README, followed by a section for each of its `readmes` (their headings moved one level down, under the `title` given there). So the repo file is the only place to edit that text: see [writing-readmes](../writing-readmes/SKILL.md#readme-vs-why-file) for how to write one. Only the `description` in the page's frontmatter is a manual section. A new page needs no stub: the target runs in `prepare`, before the site builds, writes the page, then fails until its `description` is filled in. A demo page's title is the demo's `title`, with `<ProjectHeader />` under it, in place of the README's own. The generator:

- Rewrites links: docs site URLs become site paths, a documented package's npm page becomes its overview, a repo path with a page (a documented package's directory or README, its WHY file, a demo's directory or one of its READMEs) becomes that page, and any other relative link becomes its GitHub URL. Anchors are kept only on a link to a file the page is generated from, since only there do the headings match.
- Turns a `<!-- twoslash ... -->` comment above a `ts` fence into the block's hidden setup, above `// ---cut---`.
- Formats the page with Biome.
- Fails when a package's WHY file and the `why` entry in its `pages` don't match, on a malformed twoslash comment, a twoslash directive in a shown block, a relative link to a missing file, and a page whose `description` is empty.

Infrastructure pages are the exception: the page is the narrative and the `infra/` README the runbook, so the page is written by hand.

## Blog posts

Posts aren't on this site: the blog lives on the personal site, [jacobley.github.io/blog](https://jacobley.github.io/blog/), built from the [`JacobLey/jacobley.github.io`](https://github.com/JacobLey/jacobley.github.io) repo, and how posts are written is that repo's to document. A post links here for package pages and live reports (`<GeneverComparison />` on `/packages/genever/comparison`), so those stay on this site. The old post URLs under `/blog/` are redirect pages to the personal site (`movedAway` in `config.ts`); keep them.
<!-- @manual-end rest -->

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.