Skip to main content

Module process

Module process 

Source
Expand description

Command-line argument processing and site compilation. Argument-driven site processing.

Bridges the parsed [clap::ArgMatches] from cmd::Cli to the build pipeline orchestrated in crate::run. Responsibilities:

  • Resolve content / output / template directories from CLI flags or configuration files, applying sensible defaults when callers omit them.
  • Create build and site directories on disk, ensuring distinct paths so staticdatagen::compile can finalise output by renaming.
  • Pre-process front-matter for every page in the content tree before the compiler is invoked.

Most binaries should call crate::run rather than this module directly; the helpers here are exposed for tests and embedders that need a smaller building block than the full pipeline.

Enums§

ProcessError
Represents errors that may occur during argument processing.

Functions§

args
Processes CLI arguments and executes the corresponding site compilation workflow.
ensure_directory
Ensures the specified directory exists, creating it if necessary.
get_argument
Retrieves the value of a specified command-line argument.