Merge pull request #122 from aidenybai/fix-active-graph-node
This commit is contained in:
		
						commit
						037426217c
					
				
					 4 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
					@ -1,5 +1,4 @@
 | 
				
			||||||
async function drawGraph(
 | 
					async function drawGraph(
 | 
				
			||||||
  url,
 | 
					 | 
				
			||||||
  baseUrl,
 | 
					  baseUrl,
 | 
				
			||||||
  pathColors,
 | 
					  pathColors,
 | 
				
			||||||
  depth,
 | 
					  depth,
 | 
				
			||||||
| 
						 | 
					@ -10,7 +9,7 @@ async function drawGraph(
 | 
				
			||||||
  const container = document.getElementById('graph-container')
 | 
					  const container = document.getElementById('graph-container')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const { index, links, content } = await fetchData
 | 
					  const { index, links, content } = await fetchData
 | 
				
			||||||
  const curPage = url.replace(baseUrl, '')
 | 
					  const curPage = window.location.href.replace(baseUrl, "").replace(/\/$/g, "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const parseIdsFromLinks = (links) => [
 | 
					  const parseIdsFromLinks = (links) => [
 | 
				
			||||||
    ...new Set(links.flatMap((link) => [link.source, link.target])),
 | 
					    ...new Set(links.flatMap((link) => [link.source, link.target])),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ enableToc: true
 | 
				
			||||||
openToc: false
 | 
					openToc: false
 | 
				
			||||||
enableLinkPreview: true
 | 
					enableLinkPreview: true
 | 
				
			||||||
enableLatex: true
 | 
					enableLatex: true
 | 
				
			||||||
enableSPA: false
 | 
					enableSPA: true
 | 
				
			||||||
description:
 | 
					description:
 | 
				
			||||||
  Host your second brain and digital garden for free. Quartz features extremely fast full-text search,
 | 
					  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.
 | 
					  Wikilink support, backlinks, local graph, tags, and link previews.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,6 @@
 | 
				
			||||||
<script src="{{ $js.Permalink }}"></script>
 | 
					<script src="{{ $js.Permalink }}"></script>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
drawGraph(
 | 
					drawGraph(
 | 
				
			||||||
  {{strings.TrimRight "/" .Page.Permalink}},
 | 
					 | 
				
			||||||
  {{strings.TrimRight "/" .Site.BaseURL}},
 | 
					  {{strings.TrimRight "/" .Site.BaseURL}},
 | 
				
			||||||
  {{$.Site.Data.graphConfig.paths}},
 | 
					  {{$.Site.Data.graphConfig.paths}},
 | 
				
			||||||
  {{$.Site.Data.graphConfig.depth}},
 | 
					  {{$.Site.Data.graphConfig.depth}},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -75,7 +75,6 @@
 | 
				
			||||||
        container.textContent = "";
 | 
					        container.textContent = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        drawGraph(
 | 
					        drawGraph(
 | 
				
			||||||
          {{strings.TrimRight "/" .Page.Permalink}},
 | 
					 | 
				
			||||||
          {{strings.TrimRight "/" .Site.BaseURL}},
 | 
					          {{strings.TrimRight "/" .Site.BaseURL}},
 | 
				
			||||||
          {{$.Site.Data.graphConfig.paths}},
 | 
					          {{$.Site.Data.graphConfig.paths}},
 | 
				
			||||||
          {{$.Site.Data.graphConfig.depth}},
 | 
					          {{$.Site.Data.graphConfig.depth}},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue