diff --git a/src/crates/monolith-server/src/routes/pages.rs b/src/crates/monolith-server/src/routes/pages.rs index 220bebc..df51bdb 100644 --- a/src/crates/monolith-server/src/routes/pages.rs +++ b/src/crates/monolith-server/src/routes/pages.rs @@ -3619,7 +3619,19 @@ pub async fn sitemap(State(state): State>, site: SiteCtx) -> impl .unwrap_or_default(); rows.into_iter() .filter_map(|(slug, title, content)| { - let embeds = find_youtube_embeds(&content); + // `posts.content` is stored as TipTap JSON, block JSON, or + // a JSON-string-quoted HTML literal. Apply the same fallback + // chain as the post handlers before scanning for iframes — + // raw `posts.content` has `\"` in place of `"`, so the iframe + // attribute parser would never match. + let html = if let Some(h) = monolith_core::blocks::try_render_tiptap(&content) { + h + } else if let Some(blocks) = monolith_core::blocks::parse_blocks(&content) { + monolith_core::blocks::render_blocks(&blocks) + } else { + monolith_core::blocks::unwrap_json_string(&content) + }; + let embeds = find_youtube_embeds(&html); if embeds.is_empty() { None } else {