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
minijinjais 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§
- Search
Entry - 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.