fix(site): guard parseSocialLinks against malformed SITE_SOCIAL entries
Build & Deploy / build-and-deploy (push) Successful in 2m30s

Skip entries without a url field (split by | produced fewer than 2 parts)
instead of crashing with TypeError on url.includes().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-04-28 16:33:48 +02:00
parent 2d446a1375
commit f836f09cc8
+2 -2
View File
@@ -14,10 +14,10 @@ function parseSocialLinks(envVar) {
if (!envVar) return [];
return envVar.split(",").map((link) => {
const [name, url, icon] = link.split("|").map((s) => s.trim());
// Bluesky requires "me atproto" for verification
if (!url) return null;
const rel = url.includes("bsky.app") ? "me atproto" : "me";
return { name, url, rel, icon: icon || name.toLowerCase() };
});
}).filter(Boolean);
}
// Get fediverse handle for fediverse:creator meta tag