From 22789160fd2c99327b20f0ca9d1455465a6fc8eb Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Mon, 16 Nov 2026 17:11:30 +0000 Subject: [PATCH] Full post content in RSS Signed-off-by: Marcus Noble --- app.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 45967c7..cf29ebf 100644 --- a/app.js +++ b/app.js @@ -165,12 +165,21 @@ function feedPlugin() { posts.forEach((post) => { const postUrl = `https://marcusnoble.co.uk/${post.path}/`; + + const contentKey = post.path + '/index.html'; + let renderedContent = ""; + if (files[contentKey]) { + const fullHtml = files[contentKey].contents.toString(); + const articleMatch = fullHtml.match(/
]*>([\s\S]*?)<\/div/i); + renderedContent = articleMatch ? articleMatch[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), }); });