From db1b922943f0cb214ddfdca5d5376dda1eba316f Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 18 Feb 2026 15:44:10 +0100 Subject: [PATCH] fix: generate OG images on watcher rebuilds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the incremental skip guard from OG generation. The manifest caching already handles performance — only new posts without an existing OG image get generated (~200ms each). Without this fix, posts created via Micropub never got OG images until container restart. --- eleventy.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 1e56907..537c4b9 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -582,9 +582,10 @@ export default function (eleventyConfig) { .slice(0, 5); }); - // Generate OpenGraph images for posts without photos (skip on incremental rebuilds) - eleventyConfig.on("eleventy.before", ({ incremental }) => { - if (incremental) return; + // Generate OpenGraph images for posts without photos + // Runs on every build (including watcher rebuilds) — manifest caching makes it fast + // for incremental: only new posts without an OG image get generated (~200ms each) + eleventyConfig.on("eleventy.before", () => { const contentDir = resolve(__dirname, "content"); const cacheDir = resolve(__dirname, ".cache"); const siteName = process.env.SITE_NAME || "My IndieWeb Blog";