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;