fix: generate OG images on watcher rebuilds

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.
This commit is contained in:
Ricardo
2026-02-18 15:44:10 +01:00
parent 538e94f582
commit db1b922943
+4 -3
View File
@@ -582,9 +582,10 @@ export default function (eleventyConfig) {
.slice(0, 5); .slice(0, 5);
}); });
// Generate OpenGraph images for posts without photos (skip on incremental rebuilds) // Generate OpenGraph images for posts without photos
eleventyConfig.on("eleventy.before", ({ incremental }) => { // Runs on every build (including watcher rebuilds) — manifest caching makes it fast
if (incremental) return; // for incremental: only new posts without an OG image get generated (~200ms each)
eleventyConfig.on("eleventy.before", () => {
const contentDir = resolve(__dirname, "content"); const contentDir = resolve(__dirname, "content");
const cacheDir = resolve(__dirname, ".cache"); const cacheDir = resolve(__dirname, ".cache");
const siteName = process.env.SITE_NAME || "My IndieWeb Blog"; const siteName = process.env.SITE_NAME || "My IndieWeb Blog";