struct

Hwaro::Services::Doctor::MenuScope

Inherits Struct < Value < Object

The [[menus.*]] names a page may register into, resolved per language exactly like Content::Menus.build_for_language: a [languages.<code>] block with its own menus table REPLACES the global set for that language, one without inherits it. Checking every page against the global names alone flagged a Korean page that registers into [[languages.ko.menus.footer]] as undeclared, and let a Korean page register into a global-only menu ko never renders.

A language whose resolved set is empty is using front-matter-only, ad-hoc menus (Content::Menus builds those regardless), so nothing is checked for it.

Constructors

new(config : Models::Config | Nil)
Source

Instance methods

clone
Source
config
copy_with(config _config = @config)
Source
default_language
Source
filename_language(path : String) : String | Nil

The language code a file name carries, mirroring ReadContent#extract_language_from_filename: only on a multilingual site, and only a declared code (or the default). nil otherwise — then the suffix is part of an ordinary page name.

Source
language_for(path : String) : String

The language a page renders in.

Source
names_for(language : String) : Tuple(Array(String), String)

{names, the table spelling to cite in the message}.

Source