class

Hwaro::Services::Scaffolds::Base

Inherits Reference < Object

Abstract base class for all scaffolds

Instance methods

archetype_files

Returns archetype files (path relative to archetypes/) as a hash of path => content. The default set ships a default.md that hwaro new picks up automatically (see Services::Creator#find_archetype), which both makes the archetype slot discoverable and ensures scaffolded content gets reasonable default front matter (TOML + description) without relying on the built-in template. Subclasses can extend this to add section-specific archetypes (e.g. posts.md).

Source
config_content(skip_taxonomies : Bool = false, multilingual_languages : Array(String) = [] of String) : String

Returns the config.toml content. multilingual_languages (from --include-multilingual) is threaded through so the full config emits a real, enabled [languages] block instead of the commented placeholder. The --full-config config.toml: every section, in one fixed order, with a discoverability banner per section. Scaffolds do not restate this list — they opt sections out through ships_taxonomies? and supply their menu entries through menus_config (empty by default), and bare overrides the whole method for its subset.

Source
config_title

Returns the site title used in config (overridable per scaffold). Public so hwaro doctor can source its placeholder-title advisory from the scaffolds themselves instead of a hand-kept literal list that only ever covered "My Hwaro Site".

Source
content_files(skip_taxonomies : Bool = false) : Hash(String, String)

Returns sample content files as a hash of path => content

Source
description

Returns the description of this scaffold

Source
extra_files

Files outside content/templates/static/archetypes, keyed by their path relative to the project root (e.g. data/sidebar.yml). Built-in scaffolds ship none; a remote scaffold carries its data/ and i18n/ over.

Source
font_files

The embedded Charis SIL faces (+ its OFL license), keyed by the path they're written to under static/. Scaffolds whose CSS declares the @font-face blocks merge this into static_files so the serif heading signature renders identically off-Apple (see EmbeddedFonts). bare intentionally skips it — it ships no stylesheet to reference the faces. The String values carry raw woff2 bytes; File.write emits them verbatim.

Source
minimal_config_content(skip_taxonomies : Bool = false, multilingual_languages : Array(String) = [] of String) : String

Returns a minimal config.toml without comments and optional sections

Source
multilingual_content_files(languages : Array(String), skip_taxonomies : Bool = false) : Hash(String, String)

Returns the content files to emit for a multilingual project. The first language in languages is the default (no filename suffix); each additional language gets a .{lang}.md copy of every Markdown file with a translation-TODO notice inserted.

Scaffolds can override this when they want to ship real translations, but the default preserves the scaffold's own content structure (posts/, guide/, chapter-N/, …) instead of collapsing everything into a generic index/about/blog layout.

Source
shortcode_files

Returns shortcode files as a hash of path => content

Source
skeleton_content_files(languages : Array(String) = [] of String, skip_taxonomies : Bool = false) : Hash(String, String)

The --skip-sample-content content set: the skeleton pages (and their translations) with the sample body dropped, so no sample prose or links to skipped sample pages remain.

Source
static_files

Returns static files as a hash of path => content. Every scaffold inherits a tiny SVG favicon so a freshly-generated site doesn't show a blank tab icon. Scaffolds that override static_files (blog/docs/book) merge super to keep it.

Source
template_files(skip_taxonomies : Bool = false) : Hash(String, String)

Returns template files as a hash of path => content

Source
type

Returns the scaffold type

Source