Consistently include js/page.js in relevant statement scopes

This commit is contained in:
Ryan Gibson 2024-08-08 23:02:30 -04:00
parent 18ed67b2e6
commit c12753c069
No known key found for this signature in database
GPG key ID: 2179CAF509FD45EA
4 changed files with 4 additions and 5 deletions

View file

@ -30,10 +30,10 @@
var oid = "views_{{ $path }}"
var oid_likes = "likes_{{ $path }}"
</script>
{{ end }}
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
{{ end }}
</header>
<section class="{{ if $toc -}}
mt-12

View file

@ -124,10 +124,10 @@
var oid = "views_{{ $path }}"
var oid_likes = "likes_{{ $path }}"
</script>
{{ end }}
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
{{ end }}
</section>
<footer class="pt-8 max-w-prose print:hidden">

View file

@ -28,7 +28,6 @@
{{ .Content }}
</div>
</section>
{{ end }}
<script>
var oid = "views_taxonomy_{{ .Data.Plural }}"
var oid_likes = "likes_taxonomy_{{ .Data.Plural }}"
@ -36,7 +35,7 @@
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
{{ end }}
{{ if .Site.Params.taxonomy.cardView }}

View file

@ -26,7 +26,6 @@
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content }}
</div>
{{ end }}
<script>
var oid = "views_term_{{ .Data.Term }}"
var oid_likes = "likes_term_{{ .Data.Term }}"
@ -34,6 +33,7 @@
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
{{ end }}
</section>