Production Blueprints
Enterprise Use Cases & Deployment Patterns
How engineering teams embed frontmatter-gen across static site compilers, multi-tenant CMS backends, and CI documentation gates.
Frontmatter Gen is designed as a composable building block for any Rust service or CLI workflow that processes Markdown or structured text documents.
Static Site Generators & Documentation Portals
Static site compilers frequently ingest thousands of Markdown pages authored across different eras or migrated from Hugo (TOML +++), Jekyll/Astro (YAML ---), or headless CMS exports (JSON { ... }). frontmatter-gen normalizes all three into a single Frontmatter type and synthesizes escaped HTML <meta> tags:
| Pipeline Capability | Legacy Regex / YAML 1.1 Stack | Frontmatter Gen Engine |
|---|---|---|
| Supported Header Formats | Separate crates per format | Unified YAML 1.2, TOML 1.1 & JSON in one crate |
| YAML 1.1 Norway Problem | Unquoted NO / off coerced to booleans | Strict YAML 1.2 preserves unquoted strings via noyalib |
| Body Slicing Overhead | Allocates new String copies of Markdown body | Zero-copy borrowed &str via extract_raw_frontmatter |
| SEO Meta Tag Generation | Manual string concatenation prone to unescaped quotes | Built-in entity-escaped meta::generate_metatags |
Multi-Tenant Content APIs & Untrusted Upload Guardrails
When accepting user-authored Markdown files over HTTP or webhook integrations, ParseOptions bounds recursion depth and total key counts before application logic runs:
CI/CD Documentation Linters & Cross-Format Migration
Use the standalone fmg CLI in GitHub Actions or pre-commit hooks to validate that every Markdown document in a repository contains well-formed frontmatter and convert legacy TOML headers into JSON or YAML: