struct

Hwaro::Config::Options::BuildOptions

Inherits Struct < Value < Object

Constructors

new(output_dir : String = "public", base_url : String | Nil = nil, drafts : Bool = false, include_expired : Bool = false, include_future : Bool = false, minify : Bool = false, parallel : Bool = true, workers : Int32 = 0, cache : Bool = false, full : Bool = false, highlight : Bool = true, verbose : Bool = false, profile : Bool = false, debug : Bool = false, error_overlay : Bool = false, cache_busting : Bool = true, stream : Bool = false, memory_limit : String | Nil = nil, env : String | Nil = nil, skip_og_image : Bool = false, skip_image_processing : Bool = false, preserve_output : Bool = false, fast_start : Bool = false, fast_start_count : Int32 = 20, serve_mode : Bool = false)
Source

Instance methods

apply_build_config!(build : Hwaro::Models::BuildConfig) : Nil

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.

Source
base_url
Source
base_url=(base_url : String | Nil)
Source
batch_size
Source
cache
Source
cache=(cache : Bool)
Source
cache_busting
Source
cache_busting=(cache_busting : Bool)
Source
debug
Source
debug=(debug : Bool)
Source
drafts
Source
drafts=(drafts : Bool)
Source
env=(env : String | Nil)
Source
error_overlay
Source
error_overlay=(error_overlay : Bool)
Source
fast_start

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.

Source
fast_start=(fast_start : Bool)

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.

Source
fast_start_count
Source
fast_start_count=(fast_start_count : Int32)
Source
full
Source
full=(full : Bool)
Source
highlight
Source
highlight=(highlight : Bool)
Source
include_expired
Source
include_expired=(include_expired : Bool)
Source
include_future
Source
include_future=(include_future : Bool)
Source
memory_limit
Source
memory_limit=(memory_limit : String | Nil)
Source
minify
Source
minify=(minify : Bool)
Source
output_dir
Source
output_dir=(output_dir : String)
Source
output_dir_explicit

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.

Source
output_dir_explicit=(output_dir_explicit : Bool)

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.

Source
parallel
Source
parallel=(parallel : Bool)
Source
preserve_output

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

Source
preserve_output=(preserve_output : Bool)

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

Source
profile
Source
profile=(profile : Bool)
Source
serve_mode

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

Source
serve_mode=(serve_mode : Bool)

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

Source
skip_image_processing
Source
skip_image_processing=(skip_image_processing : Bool)
Source
skip_og_image
Source
skip_og_image=(skip_og_image : Bool)
Source
stream
Source
stream=(stream : Bool)
Source
streaming?
Source
verbose
Source
verbose=(verbose : Bool)
Source
workers

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.

Source
workers=(workers : Int32)

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.

Source