Hwaro::Services::Scaffolds::Remote
Inherits Hwaro::Services::Scaffolds::Base < Reference < Object
Constants
Content files the build reads as pages (ReadContent::PAGE_EXTENSIONS).
Root-level directories copied verbatim alongside the four
built-in categories. data/ feeds sidebars/menus and i18n/
the translations, so a scaffold that relies on them built
without errors but rendered empty navigation.
Downloads in flight at once. Unbounded fan-out (one fiber per file) ran a large scaffold out of file descriptors, and every failed request used to become an empty file.
Constructors
Class methods
Map a repository path (relative to the scaffold root) to the category it is installed under, or nil to skip it.
Settings in a remote config.toml that run shell commands:
[build.hooks] pre/post and every deploy target's command.
Read from the parsed document — a text match on hooks.pre =
missed the [build.hooks] table form the loader actually reads.
Parse a remote source string, keeping the branch a
/tree/<branch>/… URL names.
Parse a remote source string into {owner, repo, subpath}
Every {branch, subpath} split of a /tree/<a>/<b>/<c> URL, the
shortest branch first: GitHub branch names may contain /
(feature/x), and the URL alone cannot say where the branch ends.
Instance methods
Remote scaffolds mirror the upstream repo verbatim; we don't
inject a built-in default.md because the remote might deliberately
not use archetypes. Its own archetypes/ is carried over.
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 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.
If the remote provided a config.toml, use it as-is (even for --minimal-config). If not (remote can be templates-only), fall back to the built-in minimal generator.
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