What this example is
A dev guide for the SSG plugin pipeline. It shows when each hook fires.
Run it from the repo root:
cargo run --example plugins
The console labels each stage:
- Cache check —
BuildCache::changed_files()skips work when nothing changed - Compile —
staticdatagen::compile()turns markdown into HTML - Plugin pipeline —
before_compile, thenafter_compile, thenon_serve - Output report — what each plugin made
Plugins shown here
SeoPlugin— Open Graph + Twitter Card tagsCanonicalPlugin—RobotsPlugin—robots.txtfileSearchPlugin— client-side search index + UIMinifyPlugin— HTML/CSS/JS minifyLiveReloadPlugin— WebSocket script for dev mode
Order matters. MinifyPlugin runs after SEO and search. It shrinks the final HTML, not a draft.
How this differs from quickstart
quickstart is a starter site you clone and ship. This example is a map of how plugins work. It has no UI polish. Read examples/plugins_example.rs next to the console output.
Where to go next
- Browse the source
- Read the Plugin trait docs for each hook