From ecca0eddaee48a14c6c764534ff020dfb9dce63a Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Wed, 18 Oct 2023 15:39:33 +0200 Subject: [PATCH] Fix header linking issues --- .eleventy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 1aaf72f99..2d46b37eb 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -49,9 +49,9 @@ function getAnchorAttributes(filePath, linkTitle) { let deadLink = false; try { const startPath = "./src/site/notes/"; - const fullPath = filePath.endsWith(".md") - ? `${startPath}${filePath}` - : `${startPath}${filePath}.md`; + const fullPath = fileName.endsWith(".md") + ? `${startPath}${fileName}` + : `${startPath}${fileName}.md`; const file = fs.readFileSync(fullPath, "utf8"); const frontMatter = matter(file); if (frontMatter.data.permalink) {