From 607e7fecabbb2ad933b78a816f492714352a5c88 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Thu, 9 Apr 2026 14:45:08 +0200 Subject: [PATCH] fix: remove duplicate _ogFileSet/hasOgImage from merge The upstream merge introduced a second hasOgImage implementation (using a hardcoded .cache/og path) alongside our existing one (using OG_CACHE_DIR). Removed the duplicate; kept ours. Co-Authored-By: Claude Sonnet 4.6 --- eleventy.config.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 9422a1f..4a1bb97 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -441,20 +441,6 @@ export default function (eleventyConfig) { } }); - // Cache: directory listing built once per build instead of 3,426 existsSync calls - let _ogFileSet = null; - eleventyConfig.on("eleventy.before", () => { _ogFileSet = null; }); - function hasOgImage(ogSlug) { - if (!_ogFileSet) { - const ogDir = resolve(__dirname, ".cache", "og"); - try { - _ogFileSet = new Set(readdirSync(ogDir)); - } catch { - _ogFileSet = new Set(); - } - } - return _ogFileSet.has(`${ogSlug}.png`); - } eleventyConfig.addTransform("og-fix", function (content, outputPath) { if (!outputPath || !outputPath.endsWith(".html")) return content;