pub fn compile_batch(
batch: &[PathBuf],
content_dir: &Path,
build_dir: &Path,
site_dir: &Path,
template_dir: &Path,
batch_idx: usize,
) -> Result<(), SsgError>Expand description
Compiles a single batch of content files into the build directory.
Creates a temporary content directory containing only the batch files,
runs staticdatagen::compile on it, then merges the output into the
final site directory.
ยงExamples
use ssg::streaming::compile_batch;
use tempfile::tempdir;
let dir = tempdir().unwrap();
// Empty batch is a no-op: returns Ok immediately.
assert!(compile_batch(&[], dir.path(), dir.path(), dir.path(), dir.path(), 0).is_ok());