graph fix

This commit is contained in:
Utsob Roy 2023-03-23 20:02:00 +06:00 committed by Ole Eskild Steensen
parent 8fcf7255d5
commit dcdb496dd3

View File

@ -36,7 +36,9 @@ function getGraph(data) {
let stemURLs = {};
let homeAlias = "/";
(data.collections.note || []).forEach((v, idx) => {
let fpath = v.filePathStem.replace("/notes/", "");
let fpath = v.data["dg-path"]
? v.data["dg-path"].split(".md")[0]
: v.filePathStem.replace("/notes/", "");
let parts = fpath.split("/");
let group = "none";
if (parts.length >= 3) {