Hwaro::Services::Scaffolds::Base
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.
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.
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".
Returns sample content files as a hash of path => content
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.
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.
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.
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