1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:41:18 -04:00

svg favicon

This commit is contained in:
2021-05-26 14:02:51 -04:00
parent 28936627bd
commit 5f81813e75
6 changed files with 12 additions and 7 deletions

View File

@@ -1,14 +1,17 @@
{{- $appleIcon := resources.Get "img/apple-touch-icon.png" }}
<link rel="apple-touch-icon" href="{{ $appleIcon.Permalink }}" sizes="{{ $appleIcon.Width }}x{{ $appleIcon.Height }}">
{{- range (split .pngSizes " ") }}
{{- $faviconPng := resources.Get (printf "img/favicon-%v.png" .) }}
<link rel="icon" href="{{ $faviconPng.Permalink }}" sizes="{{ . }}x{{ . }}">
<!-- <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="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 }}">