From 334fa146c790de396994519fd9862081c26faabc Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Mon, 16 Nov 2026 15:26:01 +0000 Subject: [PATCH] fix: RSS feed includes full post content instead of summary only - Extract body content from rendered HTML for feed descriptions - Feed readers will now see full post content, not just front-matter summary --- app.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 45967c7..334a92b 100644 --- a/app.js +++ b/app.js @@ -165,12 +165,24 @@ function feedPlugin() { posts.forEach((post) => { const postUrl = `https://marcusnoble.co.uk/${post.path}/`; + + // Find the rendered HTML content for this post + // post.path is the permalink path (e.g., 2026-03-17-kubecon-...), files use /index.html + const contentKey = post.path + '/index.html'; + 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; + } + feed.item({ title: post.title, url: postUrl, guid: postUrl, date: post.date.toISOString(), - description: post.summary || "", + description: renderedContent || post.summary || "", categories: (post.tags || "").split(" ").filter(Boolean), }); });