head: improve favicons presence

- also set theme color to #2e2e33
- use syntax from https://favicon.io
- `site.webmanifest` added, should be present in "static"

Custom links to favicons can be added in site config =>

params:
  assets:
    favicon: "<link / abs url>"
    favicon16x16:  "<link / abs url>"
    favicon32x32:  "<link / abs url>"
    apple_touch_icon:  "<link / abs url>"
    safari_pinned_tab:  "<link / abs url>"
This commit is contained in:
Aditya Telange 2020-11-05 19:45:52 +05:30
parent 3064e8cfc5
commit 795c06b2cc
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 11 additions and 2 deletions

View File

@ -37,8 +37,17 @@
as="style"> as="style">
{{- end -}} {{- end -}}
<!-- Favicons --> <!-- Favicons -->
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}"> <link rel="manifest" href="{{ "site.webmanifest" | absURL }}">
<link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}"> <link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}">
<link rel="icon" type="image/png" sizes="16x16" href="
{{- .Site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL -}}">
<link rel="icon" type="image/png" sizes="32x32" href="
{{- .Site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL -}}">
<link rel="apple-touch-icon" href="
{{- .Site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL -}}">
<link rel="mask-icon" href="{{- .Site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL -}}">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<!-- Generator --> <!-- Generator -->
{{- hugo.Generator }} {{- hugo.Generator }}
<!-- RSS --> <!-- RSS -->