From b8e2b6472f9dda9371ab0ed07b9d09d7c1783d6a Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 22 Mar 2026 09:59:38 +0100 Subject: [PATCH] fix: remove content property to prevent double video embed The `content` property caused the video to render twice: once from the markdown body and once from the `likeOf` frontmatter in the Eleventy template. Likes now rely solely on `like-of` + `name`. Co-Authored-By: Claude Opus 4.6 --- lib/likes-sync.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/likes-sync.js b/lib/likes-sync.js index bb47184..a7a2a2a 100644 --- a/lib/likes-sync.js +++ b/lib/likes-sync.js @@ -190,10 +190,6 @@ export async function syncLikes({ db, youtubeConfig, publication, postsCollectio "mp-slug": slug, "like-of": videoUrl, name: `${video.title} - ${video.channelTitle}`, - content: { - text: `${video.title} - ${video.channelTitle}`, - html: `${escapeHtml(video.title)} - ${escapeHtml(video.channelTitle)}`, - }, published: new Date().toISOString(), url: postUrl, visibility: "public", @@ -300,12 +296,4 @@ export function startLikesSync(Indiekit, options) { run().catch(() => {}); setInterval(() => run().catch(() => {}), interval); }, 15_000); -} - -function escapeHtml(str) { - return String(str) - .replace(/&/g, "&") - .replace(//g, ">") - .replace(/"/g, """); -} +} \ No newline at end of file