graph fix after dg-path feature (#113)

This commit is contained in:
Utsob Roy 2023-03-26 15:31:46 +06:00 committed by GitHub
parent 949e07318a
commit a41a4dfbc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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