diff --git a/app.js b/app.js index 334a92b..b2d0e1e 100644 --- a/app.js +++ b/app.js @@ -172,9 +172,10 @@ function feedPlugin() { let renderedContent = ""; if (files[contentKey]) { const fullHtml = files[contentKey].contents.toString(); - // Extract body content (match what metalsmith-feed did) - const bodyMatch = fullHtml.match(/]*>([\s\S]*)<\/body>/i); - renderedContent = bodyMatch ? bodyMatch[1].trim() : fullHtml; + // Extract just the post content (not header/footer/navigation) + // Match the article element which contains the actual post content + const articleMatch = fullHtml.match(/]*>([\s\S]*?)<\/article>/i); + renderedContent = articleMatch ? articleMatch[1].trim() : fullHtml; } feed.item({