mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 04:35:20 +00:00
Fix build errors
This commit is contained in:
parent
7939b70509
commit
2fe6657a92
@ -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
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
---
|
||||
title: "/{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}/"
|
||||
permalink: "notes/{{ page.fileSlug | slugify }}/"
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
|
@ -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 "";
|
||||
},
|
||||
|
@ -37,7 +37,7 @@ body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
div.translusion {
|
||||
div.transclusion {
|
||||
border-left: 4px solid gray;
|
||||
padding-left: 10px;
|
||||
position: relative;
|
||||
|
Loading…
x
Reference in New Issue
Block a user