1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 22:08:27 -04:00
jarv.is/layouts/partials/head/favicons.html
Jake Jarvis f3198e0235
clean up a bunch of layouts, especially social-images function
also made even more config.toml parameters optional, will help when finally releasing theme
2020-06-25 10:35:59 -04:00

18 lines
835 B
HTML

{{- $appleIcon := resources.Get "img/apple-touch-icon.png" }}
<link rel="apple-touch-icon" href="{{ $appleIcon.Permalink }}" sizes="{{ $appleIcon.Width }}x{{ $appleIcon.Height }}">
{{- $safariIcon := resources.Get "img/safari-pinned-tab.svg" }}
<link rel="mask-icon" href="{{ $safariIcon.Permalink }}" color="#009cdf">
{{- range (split .pngSizes " ") }}
{{- $faviconPng := resources.Get (printf "img/favicon-%v.png" .) }}
<link rel="icon" href="{{ $faviconPng.Permalink }}" sizes="{{ . }}x{{ . }}">
{{- end -}}
{{- $s := slice -}}
{{- range (split .icoSizes " ") }}{{ $s = $s | append (printf "%vx%v" . .) }}{{ end -}}
{{- $faviconIco := resources.Get "img/favicon.ico" }}
<link rel="shortcut icon" href="{{ $faviconIco.Permalink }}" sizes="{{ delimit $s " " }}">
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}">