Write documentation
Add or change a page on this site: page types, front matter, links, and checks.
On this page
Add a page that fits the site structure and passes the build.
Prerequisites
Choose the page type
The site follows Diátaxis: each page has exactly one type, and its section sets the type.
| Section | extra.type | Contains |
|---|---|---|
start/ | tutorial | One linear path with checkpoints; no options |
how-to/ | how-to | One task: prerequisites, steps, verify, undo |
concepts/ | explanation | Design and tradeoffs; no procedures |
reference/ | reference | Tables and values; no procedures or rationale |
contributing/ | how-to or reference | Developer tasks; may require mise |
contributing/decisions/ | explanation | Architecture decision records |
Pages outside contributing/ state user requirements only: Git and a POSIX sh, with mise optional.
Add the page
-
Create a regular page under
.config/dotfiles/docs/content/docs/<section>/, never an_index.md. -
Add front matter:
+++ title = "Choose plugin groups" description = "One sentence that states the outcome." weight = 20 [extra] type = "how-to" +++ -
Link other pages by source path, for example
@/docs/how-to/update.md#verify.docs:checkfails on a missing page or anchor;docs:buildchecks pages only. -
Link a tracked repository file or directory with the
sourcecomponent; end a directory with/:{{<source path=".config/helix/" />}}Link to complete configuration files; do not paste them into pages. Quote a setting only beside the text that explains it. Add a page for a tool only when it has behavior to explain; otherwise its row in File layout is enough.
Do not add updated; the build stamps each page with the author date of its last commit,
or today for uncommitted edits.
Record a decision
Write an architecture decision record (ADR) when a choice constrains future contributors and reversing it costs more than one pull request.
| Information | Where |
|---|---|
| Why the system is built this way | ADR in contributing/decisions/ |
| How a feature works and its tradeoffs for users | Concepts page on that topic |
| What changed and how to migrate | Changelog |
-
Take the next free number from Decisions.
-
Create
contributing/decisions/NNNN-short-name.mdfrom the template:+++ title = "ADR-NNNN: Short noun phrase" description = "One sentence that states the decision." weight = N [extra] type = "explanation" +++ **Status:** Accepted, YYYY-MM-DD. ## Context Forces and constraints that require a choice; facts, not arguments. ## Decision The choice, in imperative sentences. ## Consequences - What becomes easier, harder, or required of contributors. - When to revisit the decision. ## Details - Link to the concepts or contributing page that explains the topic. -
Add a row to the status table in
contributing/decisions/_index.md. -
Optionally end the related concepts page with
Decisions:and a link to the record. The concepts page never repeats the record's rationale; the record never repeats the page's detail.
Fix typos and links in place. To change an accepted decision, supersede it instead of editing it:
- Add a new record whose status line reads
Accepted, YYYY-MM-DD. Supersedes ADR-NNNN. - In the old record, change only the status line to
Superseded by ADR-NNNN, YYYY-MM-DD., linking the new record. - Update both rows in the status table.
Verify
From a configured development clone:
prek run --config .config/dotfiles/prek.toml --all-files vale
mise run docs:check -- --skip-external-links
mise run docs:build| Task | Purpose | Page dates | Link checks |
|---|---|---|---|
| Vale hook | Check prose against the Vale house style | None | None |
docs:check | Validate page types, links, and anchors | None | Internal and external by default |
docs:build | Build the publishable site | Git-derived author dates | Zola build checks page targets, not anchors |
docs:serve | Preview with live reload | None | None |
Use --skip-external-links with docs:check for a fast offline-friendly check; omit it to check external links too.
The Vale hook runs on staged documentation before each commit;
--all-files checks every tracked Markdown file except agent prompts.
Add terms that Vale reports as misspelled to .config/vale/styles/config/vocabularies/General/accept.txt
if they apply across projects, or to .config/vale/styles/config/vocabularies/House/accept.txt
if they are specific to this repository.
docs:check and docs:build fail when a page lacks extra.type or its type does not match its section.
In a clone, they also fail when a source link points at an untracked path,
or when a tracked entry under .config/ has no row in File layout.
docs:build stamps a temporary copy; it does not change the source files.
Adjust prose rules
Vale reads both files. The repository vocabulary adds terms to the user-level vocabulary.
| File | Scope | Contents |
|---|---|---|
.config/vale/.vale.ini | Every project: deploys to ~/.config/vale/.vale.ini | Packages, styles, general vocabulary, prose and commit rules |
.config/dotfiles/.vale.ini | This repository: the hooks pass it with --config | Repository vocabulary, Zola markup ignores, talk-specific rules |
The hooks set XDG_CONFIG_HOME to the checkout's .config/,
so a clone and CI read the tracked user-level file instead of the installed copy.
The custom styles live in .config/vale/styles/:
| Style | Runs on | Checks |
|---|---|---|
House | Documentation and commit messages | Latin abbreviations, wordy phrases, weasel words, there is openings, repeated words |
Generated | Documentation and commit messages | Stock phrases, hype vocabulary, sentence-opening connectives, not just X, but Y, em dashes, emoji |
Technical | Documentation | Product name casing; acronyms without a definition |
To relax a rule for one kind of document,
add a section to .config/dotfiles/.vale.ini that sets the rule and omits BasedOnStyles;
a section that names styles runs those styles alone.
Talk notes use this for first-person voice.