Guide
Writing documentation
The rules of the bundle docs/, a new page, a new area and the test that checks everything.
What it is about
docs/ is a bundle in the Open Knowledge Format. The
application shows it under /docs, see
The documentation in the application.
The documentation describes how the application is. The SPEC says how it
shall be. If they contradict each other, the documentation is
corrected.
The rules
-
Every file except
index.mdandlog.mdbegins with YAML front matter:--- type: Guide title: Setup description: One sentence saying what is on the page. tags: [installation, setup] timestamp: 2026-11-30T12:00:00+01:00 ---typeisConcept(how something is),Guide(how to do something) orReference(to look up).timestampis a point in time after ISO 8601 with zone. -
Every page stands in the
index.mdof its directory as the line* [<title>](<file>.md) - <description>, title and description word for word as in the front matter. The order there is the order in the table of contents. -
An
index.mdhas no front matter. Its title is its first heading. Onlydocs/index.mdnamesokf_versionand lists every area. -
Sections begin with
#. The application sets the title itself as the top heading and moves the others one level down. -
Links are relative, such as
[Security](../application/security.md). None leads into nothing or out of the bundle. Files outside, such asAGENTS.mdorSPEC.md, stand in code notation. -
File names of lowercase letters, digits and hyphens, also for images. Images as PNG, JPEG or WebP, no SVG.
-
log.mdis ordered by days (## YYYY-MM-DD), newest first. An entry names the kind (Create, Update), the page and what changed. -
Not in the docs: values of secrets, the development token, paths of a single computer, names of the own network and own domains. Placeholders stand in code notation instead, such as
<subdomain>.<domain>or<path>. The documentation stands in the application, which reads it out publicly, and the repository becomes public. -
English, addressing the reader as "you", factual and exact. What the documentation claims is checked against the code. A German UI text is quoted as it appears, in quotation marks.
Add a page
- Create the file in the fitting area, with complete front matter.
- Its line into the
index.mdof the area. - An entry in
docs/log.mdunder today. npm run check.
If a page changes, update timestamp and add to log.md.
Add an area
- A directory under
docs/with anindex.md: first heading as title, a sentence, then# Pageswith the lines. - A line under "Areas" in
docs/index.md. - The path
<area>/index.mdinAREASintests/docs.test.ts. The test requires exactly the areas listed there.
The test
tests/docs.test.ts runs with npm run check and checks:
| Check | What fails |
|---|---|
| exactly the expected areas | a directory without an entry in AREAS or the other way round |
| complete front matter with a known type | a missing field, another type, a timestamp without zone |
| every page in the directory of its folder | a missing or differing line in index.md |
| no front matter in directories | front matter in an index.md other than the root |
| the root lists every area | an area missing in docs/index.md |
| no link into nothing | a target that does not exist or leaves the bundle |
| the log by days | a heading in log.md that is no date, or the wrong order |
| no forbidden patterns | a match from FORBIDDEN: paths in a home directory on macOS or Linux, the word of the development token, names of a tailnet |
tests/docs-pages.test.ts checks the pages in the application: every file
has exactly one address, every link has a page as target, every image is an
image of the bundle.
The browser tests depend on single pages. e2e/docs.spec.ts,
e2e/shell.spec.ts, e2e/access.spec.ts and e2e/i18n.spec.ts expect the
heading "Documentation of HenniOKF" of docs/index.md with a link named
"Application", the pages application/overview.md (type Concept, the only
page of its area with "Overview" in its title), installation/setup.md
(title "Setup") and development/structure.md with the section "Commands",
a table with app/, a code block with npm run check and nowhere the
front matter key of the time. Whoever renames or rebuilds them updates the
tests.
Next: Texts in two languages.