mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 06:58:50 +02:00
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:
+4
-3
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user