Add favicon

This commit is contained in:
ItsDrike 2021-08-26 02:01:26 +02:00
parent aae39c13b3
commit cf116ca468
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
4 changed files with 11 additions and 1 deletions

View file

@ -7,6 +7,8 @@
{{ partial "style.html" "css/highlight.css" }}
{{ partial "style.html" "css/font-awesome.css" }}
{{ partial "favicon.html" }}
<title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
</head>
<body>

View file

@ -0,0 +1,8 @@
{{ $image := "/img/favicon.png" }}
{{ $sizes := slice 16 32 64 100 200 }}
{{ range $sizes }}
{{ $sizes := printf "%dx%d" . . }}
<link rel="icon" type="image/png" sizes="{{ $sizes }}"
href='{{ ((resources.Get $image | fingerprint).Resize $sizes).RelPermalink }}'>
{{ end }}