ssg/postprocess/mod.rs
1// Copyright © 2023 - 2026 Static Site Generator (SSG). All rights reserved.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4//! Post-processing plugins that fix staticdatagen output.
5//!
6//! These plugins run in the `after_compile` phase to sanitise XML feeds,
7//! sitemaps, manifests, and HTML output produced by the upstream
8//! `staticdatagen` crate.
9//!
10//! - `SitemapFixPlugin` -- Fixes 1, 2, 10: duplicate XML declarations,
11//! double-slash URLs, and per-page lastmod dates.
12//! - `NewsSitemapFixPlugin` -- Fix 3: populates news-sitemap entries
13//! from front-matter metadata.
14//! - `RssAggregatePlugin` -- Fix 4: aggregates per-page RSS items into
15//! the root feed.
16//! - `ManifestFixPlugin` -- Fix 8: word-boundary-safe description
17//! truncation.
18//! - `HtmlFixPlugin` -- Fix 9: repairs broken `.class=` image syntax
19//! and Fix 7: upgrades JSON-LD `@context` from `http` to `https`.
20//! - `AtomFeedPlugin` -- Generates an Atom 1.0 `atom.xml` feed from
21//! `.meta.json` sidecars.
22
23pub(crate) mod helpers;
24
25mod atom;
26mod html_fix;
27mod manifest;
28mod news_sitemap;
29mod rss;
30mod sitemap;
31
32pub use atom::AtomFeedPlugin;
33pub use html_fix::HtmlFixPlugin;
34pub use manifest::ManifestFixPlugin;
35pub use news_sitemap::NewsSitemapFixPlugin;
36pub use rss::RssAggregatePlugin;
37pub use sitemap::SitemapFixPlugin;