From dcdb496dd3859c0bc3dd321b0e5b0f1d2f3dc48d Mon Sep 17 00:00:00 2001 From: Utsob Roy Date: Thu, 23 Mar 2023 20:02:00 +0600 Subject: [PATCH] graph fix --- src/helpers/linkUtils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/linkUtils.js b/src/helpers/linkUtils.js index 189de0c..aabcc17 100644 --- a/src/helpers/linkUtils.js +++ b/src/helpers/linkUtils.js @@ -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) {