Hwaro::Models::ContentNewConfig
Inherits Reference / Object
hwaro new content scaffolding configuration.
Controls what hwaro new writes when there is no matching archetype:
front_matter_format— "toml" (default) or "yaml"default_fields— extra front matter keys (e.g. "description") emitted with empty values so users can fill them in without having to remember them.bundle— when true, new pages default to the leaf-bundle layout (foo/index.md) instead of a single file (foo.md), which is the shape needed for multilingual siblings and colocated page assets. Overridden by an archetype's own<!-- hwaro: bundle -->directive, and by--bundle/--no-bundleon the CLI (CLI > archetype > config).
Fields listed in default_fields that overlap with built-ins
(title, date, draft, tags) are ignored because those have
dedicated handling and values.
Constants
BUILTIN_FIELDS = {"title", "date", "draft", "tags"}
FORMAT_JSON = "json"
FORMAT_TOML = "toml"
FORMAT_YAML = "yaml"
VALID_FORMATS = {FORMAT_TOML, FORMAT_YAML, FORMAT_JSON}
Constructors
new
SourceInstance methods
bundle
Sourcebundle=(bundle : Bool)
Sourcedefault_fields
Sourcedefault_fields=(default_fields : Array(String))
Sourceextra_fields
Extra fields, with built-ins filtered out and duplicates removed, preserving configured order.
front_matter_format
Sourcefront_matter_format=(front_matter_format : String)
Sourcejson?
Sourcetoml?
Sourceyaml?
Source