hugo-theme-relearn/layouts/partials/custom-header.html
Sören Weber 66bc366c47
Some checks failed
docs-build-deployment / Run deploy (push) Has been cancelled
docs-build / Run build (push) Has been cancelled
theme: add compat way of including scripts #1009
Open
2025-02-02 14:00:27 +01:00

8 lines
No EOL
489 B
HTML

<!-- compat way of adding custom scripts in old Hugo documentation -->
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
{{- if or (fileExists "static/css/custom.css") (fileExists "assets/css/custom.css") }}
<link href="{{"css/custom.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
{{- end }}
{{- if or (fileExists "static/js/custom.js") (fileExists "assets/js/custom.js") }}
<script src="{{"js/custom.js" | relURL}}{{ $assetBusting }}" defer></script>
{{- end }}