Merge branch 'hugo' into fix-popover
This commit is contained in:
commit
fb867fedcf
@ -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])),
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
import { init } from '{{$router.Permalink}}';
|
import { init } from '{{$router.Permalink}}';
|
||||||
init(() => {
|
init(() => {
|
||||||
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}},
|
||||||
@ -77,7 +76,7 @@
|
|||||||
{{$.Site.Data.graphConfig.enableLegend}},
|
{{$.Site.Data.graphConfig.enableLegend}},
|
||||||
{{$.Site.Data.graphConfig.enableZoom}}
|
{{$.Site.Data.graphConfig.enableZoom}}
|
||||||
);
|
);
|
||||||
|
|
||||||
{{if $.Site.Data.config.enableLinkPreview}}
|
{{if $.Site.Data.config.enableLinkPreview}}
|
||||||
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
|
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
|
||||||
{{end}}
|
{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user