fix: merge conf
commit
364aee36fc
@ -0,0 +1,12 @@
|
||||
import { router, navigate } from "https://unpkg.com/million@1.8.9-0/dist/router.mjs"
|
||||
|
||||
export const attachSPARouting = (draw) => {
|
||||
// SPA navigation for access later
|
||||
window.navigate = navigate
|
||||
// We only mutate document.title and content within .singlePage element
|
||||
router(".singlePage")
|
||||
// We need on initial load, then subsequent redirs
|
||||
// requestAnimationFrame() delays graph draw until SPA routing is finished
|
||||
window.addEventListener("million:navigate", () => requestAnimationFrame(draw))
|
||||
window.addEventListener("DOMContentLoaded", () => requestAnimationFrame(draw))
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{{if $.Site.Data.config.enableLinkPreview}}
|
||||
{{ $js := resources.Get "js/popover.js" | resources.Fingerprint "md5" | resources.Minify }}
|
||||
<script src="{{ $js.Permalink }}"></script>
|
||||
<script>
|
||||
const useContextual = {{ $.Site.Data.config.enableContextualBacklinks }}
|
||||
initPopover({{strings.TrimRight "/" .Site.BaseURL }}, useContextual)
|
||||
</script>
|
||||
{{end}}
|
Loading…
Reference in New Issue