From f65a4148e64e71e6a55f44f2470422ae5dbcff4a Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 8 Mar 2026 14:35:30 +0100 Subject: [PATCH] Revert "fix(site): normalize malformed SITE_SOCIAL input" This reverts commit 435be455177c9b18a979fc11491e48a74519a640. --- _data/site.js | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/_data/site.js b/_data/site.js index e8a5106..7d3d342 100644 --- a/_data/site.js +++ b/_data/site.js @@ -8,30 +8,12 @@ // Parse social links from env (format: "name|url|icon,name|url|icon") function parseSocialLinks(envVar) { if (!envVar) return []; - - // Normalize common secret copy/paste mistakes, e.g. SITE_SOCIAL="..." - const cleaned = String(envVar) - .trim() - .replace(/^SITE_SOCIAL\s*=\s*/i, "") - .replace(/^['"]|['"]$/g, ""); - - return cleaned - .split(",") - .map((link) => link.trim()) - .filter(Boolean) - .map((link) => { - const [rawName, rawUrl, rawIcon] = link.split("|"); - const name = (rawName || "").trim().replace(/^['"]|['"]$/g, ""); - const url = (rawUrl || "").trim().replace(/^['"]|['"]$/g, ""); - const icon = (rawIcon || "").trim().replace(/^['"]|['"]$/g, ""); - - if (!name || !url) return null; - - // Bluesky requires "me atproto" for verification - const rel = url.includes("bsky.app") ? "me atproto" : "me"; - return { name, url, rel, icon: icon || name.toLowerCase() }; - }) - .filter(Boolean); + return envVar.split(",").map((link) => { + const [name, url, icon] = link.split("|").map((s) => s.trim()); + // Bluesky requires "me atproto" for verification + const rel = url.includes("bsky.app") ? "me atproto" : "me"; + return { name, url, rel, icon: icon || name.toLowerCase() }; + }); } // Get fediverse handle for fediverse:creator meta tag