Skip to main content

Module ssg

Module ssg 

Source
Expand description

§Static Site Generator Module

This module provides comprehensive functionality for generating static websites from markdown content with frontmatter. It handles the entire build process including template rendering, asset copying, and site structure generation.

§Features

  • Asynchronous file processing for improved performance
  • Structured logging with detailed build progress
  • Comprehensive error handling with context
  • Safe and secure file system operations
  • Development server with hot reloading

§Example

use frontmatter_gen::ssg::SsgCommand;
use clap::Parser;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let cmd = SsgCommand::parse();
    cmd.execute().await
}

Structs§

BuildArgs
Arguments for the build subcommand
ServeArgs
Arguments for the serve subcommand
SsgCommand
Command-line interface for the Static Site Generator

Enums§

SsgError
Errors specific to the Static Site Generator functionality
SsgSubCommand
Available subcommands for the Static Site Generator