From 76a13c44412f0cde97deec043c777931f5dbf909 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:53:41 +0100 Subject: [PATCH] fix: normalize related to array in seeAlsoLinks filter Indiekit stores a single related URL as a plain string, not a YAML list. Iterating over a string yields characters, breaking the See Also section. Co-Authored-By: Claude Sonnet 4.6 --- eleventy.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eleventy.config.js b/eleventy.config.js index f18a894..ca501e6 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1128,7 +1128,8 @@ export default function (eleventyConfig) { const key = String(url).replace(/\/$/, ""); if (!seen.has(key)) { seen.add(key); result.push(String(url)); } }; - for (const url of (relatedUrls || [])) add(url); + const relArray = !relatedUrls ? [] : Array.isArray(relatedUrls) ? relatedUrls : [relatedUrls]; + for (const url of relArray) add(url); try { const content = readFileSync(inputPath, "utf-8"); const escaped = siteUrl.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");