Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
1# Documentation theme
2
3`mkdocs.yml` sets `custom_dir: docs-theme`, so this directory is the whole
4MkDocs theme. It is local on purpose: the docs use the forge's default Everforest
5dark/medium palette and typography, and a downloaded theme would add a second
6visual language (and another dependency) to keep in step.
7
8| File | What it is |
9|---|---|
10| `base.html` | Document shell: top bar, page layout, search palette, footer |
11| `nav.html` | Recursive sidebar built from `mkdocs.yml`'s `nav` |
12| `toc.html` | Recursive "On this page" column from `page.toc` |
13| `404.html` | Missing-path page; listed under `theme.static_templates` |
14| `assets/docs.css` | Palette tokens, layout, type, tables, code, search, responsive rules |
15| `assets/docs.js` | Mobile navigation drawer, search palette, code copy buttons, Mermaid init |
16| `assets/pygments.css` | Token colours for fenced code, generated (see below) |
17| `assets/mermaid.min.js` | Mermaid 11.12.2, loaded only on pages that opt in |
18| `assets/mermaid.LICENSE` | Mermaid MIT licence |
19| `assets/fonts/` | Lexend and JetBrains Mono WOFF2 subsets, copied from `server/web/static/fonts/` |
20| `assets/vole-head*.png` | Brand mark, copied from `server/web/static/` |
21| `assets/favicon*` | Favicons, copied from `server/web/static/` |
22
23Static page images live under `docs/assets/`, not here: MkDocs copies that tree
24with the site, while this directory is the theme. Diagrams are Mermaid source in
25the page, not assets.
26
27The article is the flexible grid column. Both side columns sit at the top of
28the page and scroll with it: the page is one scroll, with no pinned bar or
29independently scrolling column. The page outline on the right is hidden below
301360px, where the article takes that width.
31
32## Page shape
33
34A guide starts with prerequisites, then numbered steps with a visible result, a
35failure section if the steps can fail, and two or three next links. A reference
36has a definition, a table or signature, one complete example, and the edge
37cases. When a page grows, put the reference
38half in indented H3 subsections at the bottom instead of adding a page; keep the
39task path at the top so the page still reads in order.
40
41Facts have one home. A guide may show a minimal config snippet; the reference
42owns every key, default, and limit. Do not repeat a default in both places.
43
44## Components
45
46| Markdown | Use for |
47|---|---|
48| `!!! note`, `!!! tip`, `!!! warning`, `!!! danger` | A caveat at the point of decision; danger is for secrets, restore, and irreversible actions |
49| `.start-grid` / `.start-card` | The three jobs a reader can arrive with, on the overview only |
50| `<div class="mermaid" data-source="...">` in `<figure class="doc-figure">` | A Mermaid diagram with a caption; set `mermaid: true` in the page front matter |
51
52Diagrams are Mermaid source rendered in the browser. A page that uses one sets
53`mermaid: true` in its front matter, and `base.html` loads `mermaid.min.js` only
54for that page. Put the source in the `data-source` attribute as one line with
55`;` between statements, and escape quotes and `<br/>` as HTML entities. Keeping
56the source out of the element's text means MkDocs search does not index graph
57syntax. Keep labels short: Mermaid sizes nodes to their text, but a subgraph
58title wider than its contents can still be clipped. The bundled Mermaid is
5911.12.2; keep the version and its licence file together when updating it.
60
61Reach for a table first when the content is an inventory, a client/credential
62matrix, or a list of paths. Mermaid is for a process with arrows; a table wraps
63and stays readable on a phone.
64
65The `:root` block in `assets/docs.css` is the Everforest dark/medium token set
66from `server/web/static/everforest.css` with the layout tokens from
67`server/web/static/vole.css`. A change to the forge palette belongs in both
68places; the docs are intentionally dark-only, so there is no light block to keep
69in sync.
70
71`assets/pygments.css` is generated. After changing the token mapping, regenerate
72it with the docs requirements installed:
73
74```sh
75python3 scripts/gen-pygments-css.py
76```
77
78The fonts and brand assets are copies rather than links because
79`vole pages deploy` skips symbolic links: the published branch must contain the
80files it serves. Their licenses sit beside them in `assets/fonts/`.
81