class

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-bundle on 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

Instance methods

bundle
Source
bundle=(bundle : Bool)
Source
default_fields
Source
default_fields=(default_fields : Array(String))
Source
extra_fields

Extra fields, with built-ins filtered out and duplicates removed, preserving configured order.

Source
front_matter_format
Source
front_matter_format=(front_matter_format : String)
Source
json?
Source
toml?
Source
yaml?
Source