From 99ae0853ffb6345400d55215e250469a492ef5df Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 25 Feb 2026 17:34:09 +0100 Subject: [PATCH] fix: ignore interactive/ directory from Nunjucks processing The interactive/ directory contains self-contained HTML files with JavaScript that Nunjucks incorrectly parses as template syntax. Add to ignores so Eleventy only passthrough-copies without processing. --- eleventy.config.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/eleventy.config.js b/eleventy.config.js index 57681a5..2b55c2d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -37,6 +37,10 @@ export default function (eleventyConfig) { eleventyConfig.ignores.add("pagefind"); eleventyConfig.ignores.add("pagefind/**"); + // Ignore interactive assets (served via passthrough copy, not processed as templates) + eleventyConfig.ignores.add("interactive"); + eleventyConfig.ignores.add("interactive/**"); + // Configure watch targets to exclude output directory eleventyConfig.watchIgnores.add("_site"); eleventyConfig.watchIgnores.add("_site/**"); @@ -353,6 +357,50 @@ export default function (eleventyConfig) { return new Date(dateObj).toISOString(); }); + // Digest-to-HTML filter for RSS feed descriptions + eleventyConfig.addFilter("digestToHtml", (digest, siteUrl) => { + const typeLabels = { + articles: "Articles", + notes: "Notes", + photos: "Photos", + bookmarks: "Bookmarks", + likes: "Likes", + reposts: "Reposts", + }; + const typeOrder = ["articles", "notes", "photos", "bookmarks", "likes", "reposts"]; + let html = ""; + + for (const type of typeOrder) { + const posts = digest.byType[type]; + if (!posts || !posts.length) continue; + + html += `

${typeLabels[type]}

`; + } + + return html; + }); + // Truncate filter eleventyConfig.addFilter("truncate", (str, len = 200) => { if (!str) return "";