ssg/plugins/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//! - `JsonFeedPlugin` -- Generates a JSON Feed 1.1 `feed.json` from
23//! `.meta.json` sidecars (alongside the RSS/Atom feeds).
24//! - `EdgeHeadersPlugin` -- Emits PQC-aware platform header configs
25//! for Cloudflare Workers, Netlify, and Vercel (issue #550).
26
27pub(crate) mod helpers;
28
29pub mod agentic_discovery;
30mod atom;
31pub mod edge_headers;
32mod html_fix;
33mod json_feed;
34mod manifest;
35mod news_sitemap;
36mod rss;
37mod sbom;
38mod sitemap;
39
40pub use agentic_discovery::{
41 build_manifest, build_registry, collect_mcp_resources, render_agents_txt,
42 write_agents_txt, write_ai_plugin_json, write_mcp_registry, AgentRule,
43 AgenticDiscoveryPlugin, AgentsConfig, McpConfig, McpPromptDecl,
44 McpResource, McpToolDecl,
45};
46pub use atom::AtomFeedPlugin;
47pub use edge_headers::EdgeHeadersPlugin;
48pub use html_fix::HtmlFixPlugin;
49pub use json_feed::JsonFeedPlugin;
50pub use manifest::ManifestFixPlugin;
51pub use news_sitemap::NewsSitemapFixPlugin;
52pub use rss::RssAggregatePlugin;
53#[allow(deprecated)]
54pub use sbom::SbomPlugin;
55pub use sitemap::SitemapFixPlugin;