Skip to content

Commit

Permalink
Fix from colinwilson#190
Browse files Browse the repository at this point in the history
  • Loading branch information
neilbartley committed Sep 23, 2024
1 parent f5785a2 commit d4d0d40
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<!-- Lotus Docs JS -->
{{ $app := resources.Get "/js/app.js" }}
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- $js := (slice $app) | resources.Concat "/js/bundle.js" | minify | fingerprint "sha384" }}
<script type="text/javascript" src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/footer/footer-scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

{{ $js := $slice | resources.Concat (printf "/%s/%s" ($.Scratch.Get "pathName") "js/bundle.js") -}}

{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- $js := $js | minify | fingerprint "sha384" }}
<script type="text/javascript" src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{- else }}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/docs/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
{{ else }}
{{ $flexSearch := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/flexsearch.bundle.js") }}
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{ $flexSearch := $flexSearch | minify | fingerprint "sha384" }}
<script type="text/javascript" src="{{ $flexSearch.Permalink }}" integrity="{{ $flexSearch.Data.Integrity }}" crossorigin="anonymous"></script>
{{ else }}
Expand Down Expand Up @@ -93,13 +93,13 @@
{{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "footer/katex.html") . -}}
{{ end }}
<!-- Plausible Analytics Config -->
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{ if and (.Site.Params.plausible.scriptURL | default "https://plausible.io") (.Site.Params.plausible.dataDomain) -}}
{{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/plausible") . }}
{{- end -}}
{{- end -}}
<!-- Google Analytics v4 Config -->
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- if .Site.GoogleAnalytics }}
{{- template "_internal/google_analytics.html" . -}}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<!-- Image Compare Viewer -->
{{ if ($.Scratch.Get "image_compare_enabled") }}
{{ $imagecompare := resources.Get "js/image-compare-viewer.min.js" }}
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- $js := (slice $imagecompare) | resources.Concat "/js/image-compare.js" | minify | fingerprint "sha384" }}
<script type="text/javascript" src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
{{- else }}
Expand All @@ -48,13 +48,13 @@
{{- end }}
{{- end }}
<!-- Plausible Analytics Config -->
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{ if and (.Site.Params.plausible.scriptURL) (.Site.Params.plausible.dataDomain) -}}
{{- partialCached "head/plausible" . }}
{{- end -}}
{{- end -}}
<!-- Google Analytics v4 Config -->
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- if .Site.GoogleAnalytics }}
{{- template "_internal/google_analytics.html" . -}}
{{- end -}}
Expand Down

0 comments on commit d4d0d40

Please sign in to comment.