Skip to main content

execute_build_pipeline

Function execute_build_pipeline 

Source
pub fn execute_build_pipeline(
    plugins: &PluginManager,
    ctx: &PluginContext,
    build_dir: &Path,
    content_dir: &Path,
    site_dir: &Path,
    template_dir: &Path,
    quiet: bool,
) -> Result<(), SsgError>
Expand description

Runs the build half of the pipeline: before_compile → compile → after_compile. Does not start the dev server.

Extracted from run() so the actual build can be unit-tested against a tempdir without booting an HTTP server.

§Examples

use ssg::cmd::SsgConfig;
use ssg::pipeline::{build_pipeline, execute_build_pipeline, RunOptions};

let cfg = SsgConfig::default();
let opts = RunOptions::default();
let (plugins, ctx, build, site) = build_pipeline(&cfg, &opts);
// Wired but not invoked here — would need real content/template dirs.
let _ = execute_build_pipeline(&plugins, &ctx, &build, &cfg.content_dir, &site, &cfg.template_dir, true);