class

Hwaro::Models::VersionsConfig

Inherits Reference < Object

[versions] — versioned documentation. Disabled (no effect on the build) until at least one [[versions.list]] entry is declared.

Constants

SWITCH_VALUES = {"latest", "all"}

Constructors

Instance methods

enabled?
Source
feeds

"latest" | "all": which versions feed RSS/Atom.

Source
feeds=(feeds : String)

"latest" | "all": which versions feed RSS/Atom.

Source
find(name : String) : VersionConfig | Nil
Source
for_path(content_path : String) : VersionConfig | Nil

The version owning a content-relative path (file or directory), or nil for unversioned content. Version directories never nest (the loader rejects that), so at most one entry matches.

Source
in_feeds?(page : Page) : Bool
Source
in_llms?(page : Page) : Bool

llms.txt is latest-only by design (no switch).

Source
in_search?(page : Page) : Bool
Source
in_taxonomies?(page : Page) : Bool
Source
latest

The single latest = true entry (the loader guarantees exactly one when the list is non-empty).

Source
latest_at_root

Latest version renders at its parent's natural URL (/docs/); older versions get a /<name>/ segment. When false every version keeps its segment and the parent URL becomes a redirect stub to the latest.

Source
latest_at_root=(latest_at_root : Bool)

Latest version renders at its parent's natural URL (/docs/); older versions get a /<name>/ segment. When false every version keeps its segment and the parent URL becomes a redirect stub to the latest.

Source
list
Source
list=(list : Array(VersionConfig))
Source
noindex_old

Older versions emit <meta name="robots" content="noindex"> next to a canonical pointing at the latest counterpart (when one exists).

Source
noindex_old=(noindex_old : Bool)

Older versions emit <meta name="robots" content="noindex"> next to a canonical pointing at the latest counterpart (when one exists).

Source
root_url(version : VersionConfig, lang_prefix : String = "") : String

Site-relative root URL of version (no base_path), e.g. "/docs/", "/docs/v1/", "/ko/docs/v1/" — lang_prefix is "" or "/".

Source
search

"latest" | "all": which versions enter search.json AND sitemap.xml.

Source
search=(search : String)

"latest" | "all": which versions enter search.json AND sitemap.xml.

Source
taxonomies

"latest" | "all": which versions taxonomy term pages collect from.

Source
taxonomies=(taxonomies : String)

"latest" | "all": which versions taxonomy term pages collect from.

Source
written_roots

Build-time, not config: the URL of each version root section actually in the page set, keyed by {version name, lang prefix ("" or "/")}. Filled by Content::Versions.link! before rendering.

Source