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.

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