mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-04 12:00:02 +00:00
Fix header linking issues
This commit is contained in:
parent
b3964c060c
commit
ecca0eddae
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user