Skip to content

Commit

Permalink
homepage coloured as visited in the Graph (jackyzha0#1128)
Browse files Browse the repository at this point in the history
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
leolazou authored and renyunkang committed Oct 29, 2024
1 parent a5afc28 commit 316917f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quartz/components/scripts/graph.inline.ts
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 316917f

Please sign in to comment.