Hwaro::Config::Options::BuildOptions
Constructors
Instance methods
Fill the config-backed fields from [build] in config.toml, leaving
anything the command line set explicitly alone. Precedence is
CLI flag > config.toml > the built-in defaults in initialize.
The three booleans need no explicit-flag tracking because each has
exactly one flag and that flag only ever moves the value away from
its default (--drafts/--cache set true, --no-parallel sets
false). So "still holds the default" and "the flag was absent" are
the same condition. output_dir is a string with no such property,
which is what output_dir_explicit above exists for.
Idempotent: applying the same config twice is a no-op, which matters
because hwaro serve merges config into its options and the Builder
then merges again on every rebuild.
When set (dev-server only), render only the homepage + the N most
recent pages on the initial pass; the remaining pages are stashed
on the Builder and rendered by a background fiber after the server
is already serving. Drops "ready" time on large sites from O(all)
to O(N). Always paired with fast_start_count.
When set (dev-server only), render only the homepage + the N most
recent pages on the initial pass; the remaining pages are stashed
on the Builder and rendered by a background fiber after the server
is already serving. Drops "ready" time on large sites from O(all)
to O(N). Always paired with fast_start_count.
True when -o/--output appeared on the command line. Without it a
default output_dir is indistinguishable from an explicit
-o public, and [build] output_dir would override the flag the
user actually typed. Also decides whether the path is resolved
against the original CWD under -i (see BuildCommand#run).
hwaro serve sets it too: its dedicated dev output dir
(ServeOptions::DEV_OUTPUT_DIR) is pinned against the same override
so a serve session can never build into the deployable tree.
True when -o/--output appeared on the command line. Without it a
default output_dir is indistinguishable from an explicit
-o public, and [build] output_dir would override the flag the
user actually typed. Also decides whether the path is resolved
against the original CWD under -i (see BuildCommand#run).
hwaro serve sets it too: its dedicated dev output dir
(ServeOptions::DEV_OUTPUT_DIR) is pinned against the same override
so a serve session can never build into the deployable tree.
Keep existing output files between rebuilds. Used by hwaro serve's
watch-triggered rebuilds so repeated full rebuilds don't wipe the
already-processed resized images (see ImageHooks#process_images
mtime-skip logic, which only works when destinations survive).
Keep existing output files between rebuilds. Used by hwaro serve's
watch-triggered rebuilds so repeated full rebuilds don't wipe the
already-processed resized images (see ImageHooks#process_images
mtime-skip logic, which only works when destinations survive).
True when this build is being run as part of hwaro serve (dev server).
Hooks can use this to change behavior (e.g. lazy OG generation).
True when this build is being run as part of hwaro serve (dev server).
Hooks can use this to change behavior (e.g. lazy OG generation).
Number of concurrent render workers (fibers) for the parallel render phase. 0 = auto (the default), which derives the count from the site's per-page listing fan-out rather than the CPU count — see Phases::Render#auto_render_workers for the measurements behind it. An explicit value overrides that heuristic outright, which is what benchmarking wants. Never changes output — only render concurrency.
Number of concurrent render workers (fibers) for the parallel render phase. 0 = auto (the default), which derives the count from the site's per-page listing fan-out rather than the CPU count — see Phases::Render#auto_render_workers for the measurements behind it. An explicit value overrides that heuristic outright, which is what benchmarking wants. Never changes output — only render concurrency.