Hwaro::Models::Site
Constructors
Instance methods
Does language have a written homepage (/, /<lang>/)? A partial
translation often has none, and its pages must not link /<lang>/.
Lookup indices for performance
Every listing (section.pages, section_list, pagination,
get_section().pages) reads this, so headless (render = false)
pages and non-transparent sections are left out here: they are never
written, and listing them linked a 404. A headless transparent
section still bubbles its rendered pages up — only its own index is
unwritten. get_page is a lookup, not a listing, and still sees them.
Except in a section that is itself headless: nothing of it is ever
written, so nothing links a 404, and it is the "data section" pattern
(team/_index.md with render = false and a cascade, iterated through
get_section(path="team/_index.md").pages). Filtering there emptied it.
Resolve a section by path for a given language, falling back to the
language-neutral (default-language) index when no language-specific
_index.<lang>.md exists, then to the configured default language.
Keyed by (section path, language) so a multilingual site's per-language
_index.<lang>.md files don't collide — previously a single
Hash(String, Section) kept only the first-globbed language, making
section title/description/sort_by/page_template resolve to the wrong
language. Use section_for(name, language) to look up with fallback.
Keyed by (section path, language) so a multilingual site's per-language
_index.<lang>.md files don't collide — previously a single
Hash(String, Section) kept only the first-globbed language, making
section title/description/sort_by/page_template resolve to the wrong
language. Use section_for(name, language) to look up with fallback.