docs: add missing per-category config keys to reference-config.md

Documents all keys that can appear under default-category and
categories entries: message, name-latin, notfoundmessage,
pagenotfoundmessage, font, and line-height. Adds a summary table
and updates the full example to show these keys in context.
This commit is contained in:
Claude 2026-05-21 14:46:46 +00:00
parent a939883bef
commit cc4ed7b881
No known key found for this signature in database

View file

@ -151,16 +151,40 @@ categories-use: yes # Enable the category system. Default: no.
default-category: # The category used when no ?cat= parameter is in the URL. default-category: # The category used when no ?cat= parameter is in the URL.
code: en # Short code. Used in filenames (page.en.md) and URL params. code: en # Short code. Used in filenames (page.en.md) and URL params.
name: English # Display name shown in the category selector. name: English # Display name shown in the category dropdown list.
message: English # Label shown on the selector bar (trigger button). Falls back to name.
name-latin: English # Secondary label shown in the dropdown alongside name. Use when name
# is in a non-Latin script (e.g. Arabic, Devanagari) to aid recognition.
# Omit if name is already Latin or identical to name.
direction: ltr # Text direction. ltr or rtl. Default: ltr. direction: ltr # Text direction. ltr or rtl. Default: ltr.
# rtl flips the nav position and content text direction.
notfoundmessage: "Not available in this language"
# Short note shown in the dropdown when no variant exists for the
# current page. Also enables fallback: the renderer will fall back to
# the default-category content instead of hiding the page.
# Omit to hide the category from the dropdown when no variant exists.
pagenotfoundmessage: "This page is not yet available in English."
# Message shown in the content area when a page cannot be fetched for
# this category. Overrides the top-level pagenotfoundmessage.
font: NotoNastaliqUrdu-Regular.ttf
# Font filename inside assets/fonts/. Loaded on demand when this
# category is activated. Useful for scripts that need a specific font.
line-height: 2.8 # Line height override for this category. Useful for scripts like
# Nastaliq that need extra vertical space. Restores to theme default
# when switching away.
categories: # Additional categories. categories: # Additional categories. Each entry supports the same keys as
# default-category above.
- code: nb - code: nb
name: Norsk name: Norsk
direction: ltr direction: ltr
- code: ar - code: ar
name: عربي name: عربي
direction: rtl # RTL flips nav position and content text direction. name-latin: Arabic
direction: rtl
notfoundmessage: "غير متاح"
font: NotoNastaliqUrdu-Regular.ttf
line-height: 2.8
categories-sectionnames: same # How section names are shown per category. categories-sectionnames: same # How section names are shown per category.
# same: all categories share one section name (defaultname in nav.yml). # same: all categories share one section name (defaultname in nav.yml).
@ -170,6 +194,20 @@ categories-selecticon: globe # Icon shown in the category selector bar. SVG na
categories-selecttext: "Language" # Label shown next to the icon in the category selector bar. categories-selecttext: "Language" # Label shown next to the icon in the category selector bar.
``` ```
### Per-category keys summary
| Key | Required | Description |
|---|---|---|
| `code` | Yes | Short identifier used in filenames (`page.nb.md`) and the `?cat=` URL param. |
| `name` | Yes | Display name shown in the dropdown list. |
| `message` | No | Label shown on the selector trigger button. Falls back to `name`. |
| `name-latin` | No | Secondary label in the dropdown, shown alongside `name` when `name` uses a non-Latin script. |
| `direction` | No | `ltr` or `rtl`. Default: `ltr`. RTL flips nav and content direction. |
| `notfoundmessage` | No | Short note shown in the dropdown when no variant exists for the current page. Also enables fallback to default-category content. |
| `pagenotfoundmessage` | No | Message shown in the content area when a page cannot be fetched for this category. Overrides the top-level `pagenotfoundmessage`. |
| `font` | No | Font filename from `assets/fonts/`. Loaded on demand when this category is activated. |
| `line-height` | No | Body line height override for this category. Restores to theme default when switching away. |
--- ---
## Reusable callout messages ## Reusable callout messages
@ -228,6 +266,29 @@ offline-message:
nb: "Du er frakoblet. Koble til og last inn på nytt." nb: "Du er frakoblet. Koble til og last inn på nytt."
language: en language: en
pagenotfoundmessage: "Please select a page to continue."
categories-use: yes
default-category:
code: en
name: English
direction: ltr
categories:
- code: nb
name: Norsk
direction: ltr
notfoundmessage: "Ikke tilgjengelig på norsk"
- code: ar
name: عربي
name-latin: Arabic
direction: rtl
notfoundmessage: "غير متاح"
pagenotfoundmessage: "هذه الصفحة غير متاحة."
font: NotoNastaliqUrdu-Regular.ttf
line-height: 2.8
categories-sectionnames: same
categories-selecticon: globe
categories-selecttext: "Language"
callouts: callouts:
aitranslation: aitranslation: