Skip to content

Commit

Permalink
Fix header linking issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oleeskild committed Oct 18, 2023
1 parent b3964c0 commit ecca0ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ecca0ed

Please sign in to comment.