Skip to main content

Module engine

Module engine 

Source
Expand description

§Site Generation Engine

This module provides the core site generation functionality for the Static Site Generator. It is only available when the ssg feature is enabled.

§Features

  • Asynchronous file processing
  • Content caching with size limits
  • Safe template rendering
  • Secure asset processing
  • Comprehensive metadata handling
  • Error recovery strategies

§Example

use frontmatter_gen::config::Config;
use frontmatter_gen::engine::Engine;

let config = Config::builder()
    .site_name("My Blog")
    .content_dir("content")
    .template_dir("templates")
    .output_dir("output")
    .build()?;

let engine = Engine::new()?;
engine.generate(&config).await?;

Structs§

ContentFile
Represents a processed content file, including its metadata and content body.
Engine
The primary engine responsible for site generation.