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 (openssl, 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

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.
strip_html_tags
Strip HTML tags from a string (simple implementation).

Type Aliases§

Result
Specialized Result type for ssg-core operations.