options:
file: sidebar-note.md
title: Über dieses Handbuch
collapsible: true
byLang:
en:
file: sidebar-note.en.md
title: About this handbookThat is the entry the box at the bottom left of this site comes from — German as the base, English
under byLang.
Where the language comes from
What is read is the page’s frontmatter field lang — the same field Quartz builds its
<html lang> from. If the page has none, configuration.locale applies.
The plugin needs no further plugin for this. Whether lang is written by hand or set by a
multilingual plugin makes no difference to it.
How the keys are matched
Case does not matter. The lookup happens in two passes:
- exact —
en-USfinds the entryen-US - by the front part —
en-USalso finds the entryen
If nothing matches, the base options apply. Without a warning, because that is the normal case: a
bilingual site names only the second language under byLang, and every page of the first quietly
falls through to the base.
What can differ per language
Everything except two things: dir and frontmatterKey.
One is an installation path, the other the name a page uses to address the box — neither is a question of language. If the key changed per language, a translated page would have to write a different field than its original.
Forbidden here means: not intended
The TypeScript type does not allow those two under
byLang— but aquartz.config.yamlis not type-checked. AbyLang.en.dirtherefore does take effect, measured. ForfrontmatterKeythe sentence holds in practice as well: the key is read beforebyLangapplies at all.
The order of precedence, in full
- the page’s frontmatter
byLangfor the page’s language- the base options
Each level overrides only what it names. So the entry above keeps collapsible: true from the base
options under en — only what differs is written there.
With one exception: html and file do not sit side by side, they sit against each other. An html
on a weaker level beats any file on a stronger one — see the box in
6.1.