Skip to content

Commit

Permalink
Merge branch 'hugo' into fix-popover
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai authored May 3, 2022
2 parents 32c79a5 + 0374262 commit 3789df8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions assets/js/graph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
async function drawGraph(
url,
baseUrl,
pathColors,
depth,
Expand All @@ -10,7 +9,7 @@ async function drawGraph(
const container = document.getElementById('graph-container')

const { index, links, content } = await fetchData
const curPage = url.replace(baseUrl, '')
const curPage = window.location.href.replace(baseUrl, "").replace(/\/$/g, "")

const parseIdsFromLinks = (links) => [
...new Set(links.flatMap((link) => [link.source, link.target])),
Expand Down
3 changes: 1 addition & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@
import { init } from '{{$router.Permalink}}';
init(() => {
drawGraph(
{{strings.TrimRight "/" .Page.Permalink}},
{{strings.TrimRight "/" .Site.BaseURL}},
{{$.Site.Data.graphConfig.paths}},
{{$.Site.Data.graphConfig.depth}},
{{$.Site.Data.graphConfig.enableDrag}},
{{$.Site.Data.graphConfig.enableLegend}},
{{$.Site.Data.graphConfig.enableZoom}}
);

{{if $.Site.Data.config.enableLinkPreview}}
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
{{end}}
Expand Down

0 comments on commit 3789df8

Please sign in to comment.