Adds asset fingerprinting for cache issues; moves js file to assets to take advantage of this

This commit is contained in:
Andrew Gioia 2026-05-08 09:58:51 -04:00
parent 735b35e5dd
commit 299cf01171
Signed by: andrew
GPG Key ID: FC09694A000800C8
2 changed files with 4 additions and 2 deletions

View File

@ -19,11 +19,13 @@
{{ end }} {{ end }}
</title> </title>
<meta name="description" content="{{ $description }}"> <meta name="description" content="{{ $description }}">
{{ with resources.Get "css/site.css" }} {{ with resources.Get "css/site.css" | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}"> <link rel="stylesheet" href="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{ if or .IsHome (and .IsPage (eq .Section "studies") .Params.study.toc) }} {{ if or .IsHome (and .IsPage (eq .Section "studies") .Params.study.toc) }}
<script src="{{ "js/main.js" | relURL }}" defer></script> {{ with resources.Get "js/main.js" | fingerprint }}
<script src="{{ .RelPermalink }}" defer></script>
{{ end }}
{{ end }} {{ end }}
</head> </head>
<body id='{{ with .Slug }}{{ . }}{{ else }}default{{ end }}'> <body id='{{ with .Slug }}{{ . }}{{ else }}default{{ end }}'>