pub fn collect_posts(ctx: &PluginContext) -> Vec<PostEntry>Expand description
Collects public posts from .meta.json sidecars.
Sidecar roots are tried in priority order: <build>/.meta/ (the
emit_sidecars convention), <site>/.meta/ (the staged copy the
real pipeline leaves in the output — the audited demo site’s
layout), then *.meta.json files sitting next to their HTML in
site_dir (the layout ai.rs consumes). Results are sorted by
URL for deterministic output.
§Examples
use ssg::agent_api::collect_posts;
use ssg::plugin::PluginContext;
let tmp = tempfile::tempdir().unwrap();
let ctx = PluginContext::new(tmp.path(), tmp.path(), tmp.path(), tmp.path());
assert!(collect_posts(&ctx).is_empty());