Skip to content

Build your personal knowledge base with Trilium Notes

chore(skills): name UI elements in the docs with reference links

Elian Doranbc7bad2a29e1
diff --git a/.claude/skills/writing-documentation/SKILL.md b/.claude/skills/writing-documentation/SKILL.md
index 77dc5c8793..f2b3ef7d40 100644
--- a/.claude/skills/writing-documentation/SKILL.md
+++ b/.claude/skills/writing-documentation/SKILL.md
@@ -137,8 +137,12 @@ skeletons per page kind are [references/page-templates.md](references/page-templ
5. Other pages by title as a pill, preceded by a non-breaking space:
`&nbsp;<a class="reference-link" href="../Rel/Path%20Name.md">Path Name</a>` (text = target title).
Inline phrases as `[phrase](../Rel/Path.md)`. Issues go to "[report the issue](…/Troubleshooting/Reporting%20issues.md)".
-6. UI labels and menu items in _italics_; paths with `→`: `<Options pill> → _Appearance_ → _Fonts_`.
- Settings by their UI path, never by option key.
+ **A part of the app's chrome that has a page under _UI Elements_ is always a pill** — Note menu,
+ Note Tree, Launch Bar, Options, Global menu, Right Sidebar, Status bar… — never `**Note menu**`
+ or plain text, on every mention, including the first segment of a menu path. `check` warns on
+ the bold form and prints the pill to paste.
+6. UI labels and menu items in _italics_; paths with `→`: `<Options pill> → _Appearance_ → _Fonts_`,
+ `<Note menu pill> → _Board properties_`. Settings by their UI path, never by option key.
7. Keys: `<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd>`, no spaces. Labels/relations in backticks with
prefix: `` `#board:groupBy` ``, `` `~template` ``. Files, values, env vars, syntax in backticks.
8. A button is shown by its icon: `<span class="tn-icon cke cke-<name>"></span>` for a text-editor
diff --git a/.claude/skills/writing-documentation/docs.mjs b/.claude/skills/writing-documentation/docs.mjs
index 4e32317b4b..90db2392a2 100644
--- a/.claude/skills/writing-documentation/docs.mjs
+++ b/.claude/skills/writing-documentation/docs.mjs
@@ -570,6 +570,10 @@ function checkStructure(index, errors, warnings) {
function checkContent(index, errors, warnings) {
const { treeName } = index;
const titleByFile = new Map(index.pages.filter((p) => p.file).map((p) => [p.file, p.title]));
+ // Pages for a part of the app's chrome, which other pages name with a pill rather than in bold.
+ const uiElements = index.pages
+ .filter((p) => p.file && !p.isClone && p.ancestors.some((a) => a.title === "UI Elements"))
+ .map((p) => ({ page: p, bold: new RegExp(`\\*\\*${p.title.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\*\\*`, "i") }));
for (const page of index.pages) {
if (!page.file || page.isClone || !page.file.endsWith(".md")) continue;
const md = readPage(page);
@@ -598,6 +602,9 @@ function checkContent(index, errors, warnings) {
if (/[A-Za-z]\\\\[A-Za-z]/.test(l)) warnings.push(`${at}: stray backslash inside a word ("${l.match(/\w*\\\\\w*/)[0]}")`);
if (/\b(colour|centre|organis(e|ation)|customis|behaviour|synchronis|recognis|licence\b|grey\b)/i.test(l) && !/```|http/.test(l)) warnings.push(`${at}: British spelling (the docs are US English)`);
if (/TriliumNext Notes/.test(l)) warnings.push(`${at}: "TriliumNext Notes" — the product is "Trilium"`);
+ for (const ui of uiElements) {
+ if (ui.page !== page && ui.bold.test(l)) warnings.push(`${at}: **${ui.page.title}** in bold — name it with a pill: <a class="reference-link" href="${relativeHref(page, ui.page)}">${escapeHtml(ui.page.title)}</a>`);
+ }
if (/\b(Ctrl|Shift|Alt|Cmd)\s*\+\s*\w/.test(l) && !/<kbd>/.test(l) && !/^\s*[`|]|```/.test(l)) warnings.push(`${at}: plain-text shortcut — write each key as <kbd>…</kbd>`);
for (const [, href, text] of l.matchAll(/<a class="reference-link" href="([^"]+)">([^<]*)<\/a>/g)) {
const target = resolveRelative(dir, unescapeHtml(href));
diff --git a/.claude/skills/writing-documentation/references/style-guide.md b/.claude/skills/writing-documentation/references/style-guide.md
index 9eb64677a2..f994af4165 100644
--- a/.claude/skills/writing-documentation/references/style-guide.md
+++ b/.claude/skills/writing-documentation/references/style-guide.md
@@ -67,6 +67,13 @@ normalizes what it can.
- Paths are relative to the current file (`../` as needed). Spaces `%20`, `&` `%26`, `,` `%2C`.
Parentheses stay literal inside `href="…"` but are escaped in Markdown links:
`Server%20Installation/HTTPS%20\(TLS\).md`.
+- **UI elements are pills.** The parts of the app's chrome documented under _UI Elements_ (Note
+ menu, Note Tree, Launch Bar, Options, Global menu, Right Sidebar, Status bar, Breadcrumb, …) are
+ named with a pill every time, including as the first segment of a menu path:
+ `<a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20menu.md">Note menu</a> → _Board properties_`.
+ `**Note menu**` or plain "Note menu" sends the reader nowhere; `check` warns on the bold form and
+ prints the pill to paste. Italics stay for a menu *item* that happens to share a page's name
+ (_Insert_ → _Tabs_, the Global menu's _Options_ item).
- Links into hidden system notes stay as `#root/_hidden/_options/_optionsTextNotes` (17); the
`_hidden/` segment is mandatory.
- Issues are reported via the internal page: "feel free to [report the