1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:58:26 -04:00
jarv.is/layouts/partials/head/favicons.html
2021-05-26 14:02:51 -04:00

18 lines
834 B
HTML

{{- 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="icon" href="{{ $faviconIco.Permalink }}"> <!-- sizes="{{ delimit $s " " }}" -->
{{- $faviconSvg := resources.Get "img/favicon.svg" }}
<link rel="icon" href="{{ $faviconSvg.Permalink }}" type="image/svg+xml">
{{- $appleIcon := resources.Get "img/apple-touch-icon.png" }}
<link rel="apple-touch-icon" href="{{ $appleIcon.Permalink }}" sizes="{{ $appleIcon.Width }}x{{ $appleIcon.Height }}">
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}">