Hwaro::Content::Versions
Instance methods
"" for the default language, "/" otherwise — the same prefix
PermalinkResolver puts in front of every non-default-language URL.
Fill page.version_links for every versioned page and, when the
latest version does NOT render at its parent's root, alias the
parent URL (/docs/, /ko/docs/) to the latest version's root so
the natural docs URL never 404s.
Counterparts are matched by (version, language, path relative to the
version directory) — docs/v1/install.md ↔ docs/v2/install.md,
docs/v1/install.ko.md ↔ docs/v2/install.ko.md. A headless
(render = false) counterpart is never written, so it does not
count as existing.
page.version object: {name, label, latest, url}. url is the root
URL of the version in the page's language (see root_url).
Root URL of version for a language prefix: the root section in that
language, else (a partial translation) the default language's root,
never the unwritten /<lang>/… URL. The computed URL is the last
resort when no root section exists at all.
The global versions variable for one language prefix: iterable
({% for v in versions %}) AND attribute-addressable
(versions.latest, versions.all, versions.size).