fix acces hashing and asset data file usage
parent
d44a0fc13f
commit
d6242e1842
|
@ -2,12 +2,12 @@
|
||||||
{{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }}
|
{{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }}
|
||||||
<!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
|
<!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
|
||||||
{{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }}
|
{{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }}
|
||||||
{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify }}
|
{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | fingerprint }}
|
||||||
<script defer src="{{ $searchJS.RelPermalink }}"></script>
|
<script defer src="{{ $searchJS.RelPermalink }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if default true .Site.Params.GeekdocAnchorCopy }}
|
{{ if default true .Site.Params.GeekdocAnchorCopy }}
|
||||||
<script defer src="{{ "js/clipboard.min.js" | relURL }}"></script>
|
<script defer src="{{ index .Site.Data.assets "js/clipboard.min.js" | relURL }}"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function(event) {
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
var clipboard = new ClipboardJS('.clip');
|
var clipboard = new ClipboardJS('.clip');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ if not (.Page.Scratch.Get "mermaid") }}
|
{{ if not (.Page.Scratch.Get "mermaid") }}
|
||||||
<!-- Include mermaid only first time -->
|
<!-- Include mermaid only first time -->
|
||||||
<script defer src="{{ "js/mermaid.min.js" | relURL }}"></script>
|
<script defer src="{{ index .Site.Data.assets "js/mermaid.min.js" | relURL }}"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function(event) {
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
|
|
Loading…
Reference in New Issue