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.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs-theme/README.md +41−10

@@ -12,22 +12,53 @@ visual language (and another dependency) to keep in step.
12 12 | `toc.html` | Recursive "On this page" column from `page.toc` |
13 13 | `404.html` | Missing-path page; listed under `theme.static_templates` |
14 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 |
15 | `assets/docs.js` | Mobile navigation drawer, search palette, code copy buttons, Mermaid init |
16 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 |
17 19 | `assets/fonts/` | Lexend and JetBrains Mono WOFF2 subsets, copied from `server/web/static/fonts/` |
18 20 | `assets/vole-head*.png` | Brand mark, copied from `server/web/static/` |
19 21 | `assets/favicon*` | Favicons, copied from `server/web/static/` |
20 22
21 The page is a shell, not a scrolling document. `body` is one viewport tall with
22 `overflow: hidden`, the top bar is `position: fixed`, and `.content`, `.sidebar`,
23 and `.toc` each scroll inside their own column. That is what keeps the bar and
24 the navigation still while long articles move, and it is why nothing is drawn
25 under the bar. A new scrollable region needs `overscroll-behavior: contain`, or a
26 wheel over it chains to whatever is behind it.
23 Static page images live under `docs/assets/`, not here: MkDocs copies that tree
24 with the site, while this directory is the theme. Diagrams are Mermaid source in
25 the page, not assets.
27 26
28 Because the article pane owns the scroll, the page footer lives inside `.content`
29 and travels with the text; `html`'s `scroll-padding-top` no longer applies to
30 fragment jumps, so the pane carries its own `scroll-padding-top`.
27 The article is the flexible grid column. The page outline is its own sticky
28 column on the right; below 1360px it is hidden and the article takes that width.
29
30 ## Page shape
31
32 A guide starts with prerequisites, then numbered steps with a visible result, a
33 failure section if the steps can fail, and two or three next links. A reference
34 has a definition, a table or signature, one complete example, and the edge
35 cases. When a page grows, put the reference
36 half in indented H3 subsections at the bottom instead of adding a page; keep the
37 task path at the top so the page still reads in order.
38
39 Facts have one home. A guide may show a minimal config snippet; the reference
40 owns every key, default, and limit. Do not repeat a default in both places.
41
42 ## Components
43
44 | Markdown | Use for |
45 |---|---|
46 | `!!! note`, `!!! tip`, `!!! warning`, `!!! danger` | A caveat at the point of decision; danger is for secrets, restore, and irreversible actions |
47 | `.start-grid` / `.start-card` | The three jobs a reader can arrive with, on the overview only |
48 | `<div class="mermaid" data-source="...">` in `<figure class="doc-figure">` | A Mermaid diagram with a caption; set `mermaid: true` in the page front matter |
49
50 Diagrams are Mermaid source rendered in the browser. A page that uses one sets
51 `mermaid: true` in its front matter, and `base.html` loads `mermaid.min.js` only
52 for that page. Put the source in the `data-source` attribute as one line with
53 `;` between statements, and escape quotes and `<br/>` as HTML entities. Keeping
54 the source out of the element's text means MkDocs search does not index graph
55 syntax. Keep labels short: Mermaid sizes nodes to their text, but a subgraph
56 title wider than its contents can still be clipped. The bundled Mermaid is
57 11.12.2; keep the version and its licence file together when updating it.
58
59 Reach for a table first when the content is an inventory, a client/credential
60 matrix, or a list of paths. Mermaid is for a process with arrows; a table wraps
61 and stays readable on a phone.
31 62
32 63 The `:root` block in `assets/docs.css` is the Everforest dark/medium token set
33 64 from `server/web/static/everforest.css` with the layout tokens from