From 9d3bbd607687899d173e9087f2782d7460ebee82 Mon Sep 17 00:00:00 2001
From: Aiden Bai <aiden.bai05@gmail.com>
Date: Tue, 03 May 2022 15:53:18 +0000
Subject: [PATCH] Fix active node on graph
---
data/config.yaml | 2 +-
assets/js/graph.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/assets/js/graph.js b/assets/js/graph.js
index c5829e9..c32035d 100644
--- a/assets/js/graph.js
+++ b/assets/js/graph.js
@@ -1,5 +1,5 @@
async function drawGraph(
- url,
+ _url,
baseUrl,
pathColors,
depth,
@@ -10,7 +10,7 @@
const container = document.getElementById('graph-container')
const { index, links, content } = await fetchData
- const curPage = url.replace(baseUrl, '')
+ const curPage = window.location.href.replace(baseUrl, '').slice(0, -1)
const parseIdsFromLinks = (links) => [
...new Set(links.flatMap((link) => [link.source, link.target])),
diff --git a/data/config.yaml b/data/config.yaml
index afa531c..2676ac2 100644
--- a/data/config.yaml
+++ b/data/config.yaml
@@ -3,7 +3,7 @@
openToc: false
enableLinkPreview: true
enableLatex: true
-enableSPA: false
+enableSPA: true
description:
Host your second brain and digital garden for free. Quartz features extremely fast full-text search,
Wikilink support, backlinks, local graph, tags, and link previews.
--
Gitblit v1.10.0