From 2d51f291999ca41bc1e29d99533bc1b5b08d6956 Mon Sep 17 00:00:00 2001 From: cflmy Date: Fri, 28 Aug 2026 11:26:01 +0800 Subject: [PATCH] fix(web): restore sitemap_json helper used by ABI Co-authored-by: Cursor --- plugins/web/src/sitemap.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/web/src/sitemap.rs b/plugins/web/src/sitemap.rs index 9a40527..40ca601 100644 --- a/plugins/web/src/sitemap.rs +++ b/plugins/web/src/sitemap.rs @@ -136,6 +136,11 @@ pub fn build_robots(sitemap_url: Option<&str>) -> String { out } +/// ABI helper returning `{ xml }`. +pub fn sitemap_json(base: &str, items: &Value) -> Value { + json!({ "xml": build_sitemap(base, items) }) +} + /// ABI helper returning `{ body }`. #[allow(dead_code)] pub fn robots_json(sitemap_url: Option<&str>, body: Option<&str>) -> Value {