How the docs are organised
Docs for PKI Manager 3.17.0 (released 2026-11-24), from main 4d59c30 (30 commits after the release). Page changed after 3.17.0, not in a release yet.
One topic has one document. This page says where each kind of document lives, how the website is built from them, and the rules that keep one source of truth.
Where things live
Section titled “Where things live”| You write about | It lives in | Readers find it at |
|---|---|---|
| What PKI Manager is and does | docs/about.md, docs/how-it-works.md, docs/features/ |
/about/, /how-it-works/, /features/ |
| How to install, use and operate it | docs/get-started/, docs/guides/, docs/ssh/, docs/operations/, docs/api/ |
the same path on the site |
| How to develop it | docs/development/ |
/development/ |
| A component with its own folder | the README.md next to its code (scep/, krl-client/, ansible/) |
the path set in site/docs.config.mjs |
| Why it is built this way | backlog/decisions/ (decision records in force) |
/project/decisions/ |
| The plan of a large piece of work that is open now | backlog/docs/ (specifications) |
/project/specs/ |
| Replaced decisions and plans of finished work | backlog/archive/decisions/, backlog/archive/docs/ |
not published |
| What changed in each release | CHANGELOG.md |
/operations/releases/ |
| The API reference | generated from the backend source when the site is built | /api/reference/ |
| Work to do | backlog/tasks/ and GitHub issues |
not published |
| Rules for coding agents | the AGENTS.md files |
not published |
The rules
Section titled “The rules”-
The URL of a page is its path under
docs/.docs/guides/private-ca.mdis/guides/private-ca/, anddocs/get-started/index.mdis/get-started/. To add a page, add a file. -
Nothing is written twice. Search before you write. If the topic has a home, change it there and link to it from other pages. A summary that repeats a page is wrong as soon as the page changes.
-
The site has no text of its own.
site/holds layout and code. Its content folders are made at build time from this repository and are not committed. -
The README is a front page. It says what the project is and links to the site. It repeats nothing.
-
Records are history, and only live records are published. A decision record or a specification is not updated when the product changes. The site shows each one with a note that says so. The guides describe the current behaviour. Archive a record with the Backlog.md CLI (
backlog decision archive <id>,backlog doc archive <id>) when:- a decision is replaced by a new one, or was never built;
- a record is not a decision (a guide, an inventory of one branch);
- the work of a specification is done. What lasts goes first to a decision record (why) or to a guide (how).
An archived record stays in the repository and in git, but not on the site. Do not link to it from a document.
-
Every Markdown file has a declared home. The site build stops when a Markdown file is not under
docs/, is not a record, and is not listed insite/docs.config.mjs. That file lists the component documents that are published and the files that stay in the repository only, each with the reason. This is the check that stops a second copy of a topic. -
Write what you ran or read in the code. A guide whose steps were run on a real stack says which release it used (see below). Do not describe a feature from memory.
-
English only, short sentences, steps as numbered lists, real output.
-
Diagrams are PlantUML, never ASCII art. See
docs/diagrams/README.md.
Write a page
Section titled “Write a page”-
Start the file with
# Title. The site takes the title from that line. -
Link to another document with a relative path to its
.mdfile, for example[Docker deployment](../operations/deployment.md). The build turns it into a site link, so the link works on GitHub and on the site. A link to a file that is not published becomes a GitHub link. A broken relative link stops the build. -
Put images next to the document, in an
img/folder, and link them with a relative path. -
The sidebar label and the order of a page are optional: add the page to
PAGESinsite/docs.config.mjs. A page that is not there uses its title and goes last in its section. -
When a page moves, add the old path to
REDIRECTSin the same file. -
When every step of a guide was run on a real stack, add this line after the title. The page then shows the release next to the release that the site documents:
<!-- tested-with: 3.17.0 -->
Product pages
Section titled “Product pages”The pages under /features/, /how-it-works/ and /about/ use the product layout instead of
the docs sidebar. Their text is still Markdown in docs/. They start with a small header:
---title: SSH certificate authoritysummary: One sentence. It is the text of the card on the home page and the lead of the page.order: 4 # position on the features pageimage: img/ssh-hosts.png # screenshot of the card and of the page headerimageAlt: What the screenshot showslinks: # "Read more" list at the end of the page - label: SSH video series href: ../ssh/explainer/index.html---Every statement on a product page must be true for the current release. Each feature page ends with what the feature does not do.
Build the site
Section titled “Build the site”The site is an Astro project with Starlight in site/.
just site-dev # live reload on http://localhost:52085just site-build # build into site/dist and check every internal linkjust site-preview # serve the build on http://localhost:52086The first time, run npm ci in site/ (Node.js version in site/.nvmrc) and pnpm install at
the root: the API reference is generated by starting the backend from source for a moment.
The build does these steps (site/package.json):
scripts/sync-docs.mjschecks that every Markdown file has a home, then writes the site content from the repository: titles, links, images, the release of each page.scripts/plantuml.mjsrenders the diagrams with the PlantUML serverplantuml.joor.net(setPLANTUML_APIfor another server).scripts/openapi.mjswrites the OpenAPI document from the backend source.astro buildmakes the pages.scripts/check-links.mjsstops the build on a broken internal link.
The workflow .github/workflows/docs.yml runs the same build on each pull request. From main, it
publishes the site image, and https://pki-manager.oriolrius.cat shows the change about 10 minutes
later: see Website deploy.
Versions on the site
Section titled “Versions on the site”Each page shows the release that the site documents (the version in the root package.json), the
release that tested the steps (the tested-with line) and the first release that has the last
change of the page (from git). site/scripts/version.mjs computes them. It needs the full git
history, so a shallow clone stops the build.
Demo stack, screenshots and examples
Section titled “Demo stack, screenshots and examples”Screenshots and examples come from a demo stack with made-up data. It runs the published images on its own ports, with its own Keycloak, and never touches the dev data.
just demo up # start a clean demo stack (UI http://localhost:47380, API http://localhost:47300)just demo token # print an access token of the demo adminjust demo shots # start it and take the screenshots (Playwright specs in site/demo/shots/)just demo down # stop it and delete its volumes- Demo users:
alex(admin) anduma(user), passwordDemo-Pass-1. IMAGE_TAGselects the release of the images, for exampleIMAGE_TAG=3.16.1 just demo up. The default is insite/demo/demo.sh; change it when you run the examples and the screenshots again on a new release, and change thetested-withline of those pages too.- The specs in
site/demo/shots/write the screenshots of the guides todocs/guides/img/and the screenshots of the product pages todocs/features/img/. Commit the images. site/demo/doc-examples.sh docs/api/how-to.mdruns everybashblock of a document against the demo stack and stops at the first error. CI runs it for the API how-to.
PKI Manager is a personal project of Oriol Rius, built for his own use. It is not a commercial product. About this project