Fix build errors

This commit is contained in:
Ole Eskild Steensen 2023-01-06 14:45:12 +01:00
parent 7939b70509
commit 2fe6657a92
4 changed files with 4 additions and 5 deletions

View File

@ -31,7 +31,7 @@ module.exports = async () => {
return orderedTree;
}
function getPermalinkAndName(path) {
function getPermalinkAndName(path, key) {
let permalink = "/"
let name = key.replace(".md", "");
try {
@ -56,7 +56,7 @@ function populateWithPermalink(tree) {
const isNote = tree[key].path.endsWith(".md");
tree[key].isNote = isNote;
if (isNote) {
let { permalink, name } = getPermalinkAndName(tree[key].path);
let { permalink, name } = getPermalinkAndName(tree[key].path, key);
tree[key].permalink = permalink
tree[key].name = name
}

View File

@ -1,5 +1,4 @@
---
title: "/{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}/"
permalink: "notes/{{ page.fileSlug | slugify }}/"
---
<!DOCTYPE html>

View File

@ -33,7 +33,7 @@ module.exports = {
noteTitle: (data) => {
const currentnote = data.collections.gardenEntry && data.collections.gardenEntry[0];
if (currentnote && currentnote.data) {
return currentNote.data.title || currentnote.data.page.fileSlug;
return currentnote.data.title || currentnote.data.page.fileSlug;
}
return "";
},

View File

@ -37,7 +37,7 @@ body {
padding: 10px;
}
div.translusion {
div.transclusion {
border-left: 4px solid gray;
padding-left: 10px;
position: relative;