hugo-owu-se/layouts/partials/custom_head.html

25 lines
1.5 KiB
HTML

<link rel="icon" type="image/png" sizes="32x32" href="/images/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/icon/favicon-16x16.png">
{{ if (.Eq (site.GetPage "/")) }}
{{- $randomize := (resources.Get "js/randomize.js" ) }}
{{- $image_array := (resources.Get "js/image-array.js" ) }}
{{- $text_array := (resources.Get "js/text-array.js" )}}
{{- $randomize_combined := slice $image_array $text_array $randomize | resources.Concat "js/random.js" | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $randomize_combined := $randomize_combined | fingerprint }}
<script defer crossorigin="anonymous" src="{{ $randomize_combined.RelPermalink }}" integrity="{{ $randomize_combined.Data.Integrity }}"></script>
{{ else }}
<script defer crossorigin="anonymous" src="{{ $randomize_combined.RelPermalink }}"></script>
{{ end }}
{{ end }}
{{- /* specials CSS stylesheet */}}
{{- $special_stylesheet := (resources.Get "css/specials.css") | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $special_stylesheet := $special_stylesheet | fingerprint }}
<link crossorigin="anonymous" href="{{ $special_stylesheet.RelPermalink }}" integrity="{{ $special_stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
{{ else }}
<link crossorigin="anonymous" href="{{ $special_stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{ end }}