Hwaro::Services::Scaffolds::Base
Inherits Reference / Object
Abstract base class for all scaffolds
Instance methods
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).
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.
Returns sample content files as a hash of path => content
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.
Returns a minimal config.toml without comments and optional sections
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.
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.
Returns template files as a hash of path => content