Anyone maintaining de/index.md and en/index.md has nothing at /. The plugin writes a small
index.html there that redirects:
options:
rootRedirect: browser
rememberChoice: truerootRedirect | What happens |
|---|---|
none | nothing (default) |
default | always to the default language’s start page |
browser | to the visitor’s language, if one fits |
Only when the root is free
If an
index.mdsits directly in the vault,/belongs to it. The plugin does not overwrite it.
How browser decides
In order:
- The remembered choice — if the visitor has picked a language in the switcher before, that applies.
navigator.languages— the browser’s languages, in its order; the first match among the configured ones wins.- The default language.
The remembered choice comes first, and that is the point: somebody who once switched to German does not want to land in English on the next visit just because their browser says so.
Switched off with rememberChoice: false — then only the browser language remains.
Without JavaScript
The generated page contains both: a <noscript> with a meta refresh to the default language and a
plain list of all language links. Whoever arrives without a script is redirected or can click; the
page is never empty.
Redirects are no substitute for content, as far as search engines go
A root that only redirects has nothing to index. Anyone who cares about the start page is better off maintaining a real
index.mdwithhreflangto the language versions.