From 0472daa00313b587de5e75b7a877db3e16025034 Mon Sep 17 00:00:00 2001 From: Leo Lazou Date: Wed, 12 Jun 2024 18:39:49 +0200 Subject: [PATCH] homepage coloured as visited in the Graph (#1128) simplifies slug from FullSlug to SimpleSlug before storing it in the visited pages list in memory this leads to "index" page and "folder/index", "tags/tag/index" being stored a "/", "folder/" and "tags/tag/" respectively in the list of visited pages. this ensures that the homepage is rightfully coloured as a visited page in the "color" function of the graph --- quartz/components/scripts/graph.inline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index 15a9a06..1a4140b 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -361,7 +361,7 @@ function renderGlobalGraph() { document.addEventListener("nav", async (e: CustomEventMap["nav"]) => { const slug = e.detail.url - addToVisited(slug) + addToVisited(simplifySlug(slug)) await renderGraph("graph-container", slug) const containerIcon = document.getElementById("global-graph-icon")