Skip to main content

Crate ssg_core

Crate ssg_core 

Source
Expand description

§ssg-core — Platform-independent SSG compilation pipeline

This crate contains the pure-logic core of SSG, with no system dependencies (rayon, http-handle). It compiles to wasm32-wasi and wasm32-unknown-unknown (via wasm-bindgen).

§Features

  • Markdown → HTML compilation (pulldown-cmark with GFM extensions)
  • Frontmatter parsing (TOML/JSON/YAML)
  • Template rendering (when minijinja is enabled)
  • Shortcode expansion
  • SEO metadata generation
  • Search index generation

Re-exports§

pub use content_provider::ContentProvider;
pub use content_provider::FsContentProvider;
pub use content_provider::MemoryContentProvider;
pub use content_provider::ProviderError;
pub use content_provider::ProviderResult;
pub use isr_manifest::build_entry;
pub use isr_manifest::hash_sources;
pub use isr_manifest::CachePolicy;
pub use isr_manifest::Manifest;
pub use isr_manifest::ManifestEntry;
pub use isr_manifest::DEFAULT_SWR;
pub use isr_manifest::DEFAULT_S_MAXAGE;
pub use isr_manifest::MANIFEST_VERSION;

Modules§

content_provider
ContentProvider — abstract I/O for the renderer.
isr_manifest
ISR build manifest — dist/.ssg/manifest.json.

Structs§

SearchEntry
Generate a search index entry from HTML content.

Enums§

Error
The error type for ssg-core operations.

Functions§

build_search_entry
Build a search index entry from HTML content and metadata.
compile_markdown
Compile a Markdown string to HTML.
compile_page
Compile a complete page: parse frontmatter, render Markdown to HTML.
parse_frontmatter
Parse frontmatter from a Markdown file.
reading_time
Estimates reading time in minutes from text content.
slugify
Converts a string to a URL-safe slug.
split_terms
Splits a front-matter term list into trimmed, non-empty terms.
strip_html_tags
Strip HTML tags from a string (simple implementation).

Type Aliases§

Result
Specialized Result type for ssg-core operations.