| | |
| | | <script src="{{$s.Permalink}}"></script> |
| | | {{end}} |
| | | {{partial "katex.html" .}} |
| | | |
| | | {{partial "mermaid.html" .}} |
| | | |
| | | <script src="https://unpkg.com/@floating-ui/core@0.7.3"></script> |
| | | <script src="https://unpkg.com/@floating-ui/dom@0.5.4"></script> |
| | |
| | | "indices/contentIndex.json" | resources.Fingerprint "md5" | resources.Minify |
| | | }} |
| | | <script> |
| | | const SEARCH_ENABLED = {{.Site.Data.config.search.enableSemanticSearch}} |
| | | const PRODUCTION = {{ hugo.IsProduction }} |
| | | const BASE_URL = {{.Site.BaseURL}} |
| | | const fetchData = Promise.all([ |
| | | fetch("{{ $linkIndex.Permalink }}") |
| | |
| | | |
| | | } |
| | | {{end}} |
| | | |
| | | {{if $data.enableMermaid | default $.Site.Data.config.enableMermaid}} |
| | | var els = document.getElementsByClassName("mermaid"); |
| | | if (els.length > 0) { |
| | | import('https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs').then( |
| | | (obj) => { |
| | | // init forces mermaid to render mermaid markdown without waiting |
| | | // for DOMContentLoaded event |
| | | obj.default.init(); |
| | | } |
| | | ) |
| | | } |
| | | {{end}} |
| | | } |
| | | |
| | | const init = (doc = document) => { |