hugo-theme-relearn/exampleSite/layouts/partials/dependencies/variantgenerator.html
Sören Weber deee4ae6b7
theme: fix flash of non-default variant, part II #757
adapt the variant generator to previous changes;
interestingly, the new mechanism caused the variant generator
to be greatly simplified; something, I didn't expect beforehand
2024-12-08 00:17:03 +01:00

8 lines
No EOL
269 B
HTML

{{- $page := .page }}
{{- $location := .location }}
{{- if eq $location "header" }}
{{- with $page }}
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
<script src="{{"js/variant.js" | relURL}}{{ $assetBusting }}"></script>
{{- end }}
{{- end }}