Improve favicon meta tags, support realfavicongenerator.
This commit is contained in:
parent
3f296ab2d6
commit
fea098e8f1
2 changed files with 15 additions and 1 deletions
|
|
@ -159,10 +159,13 @@ params:
|
||||||
piwikSiteId: # Matamo site id
|
piwikSiteId: # Matamo site id
|
||||||
piwikTrackerUrl: "" # Matamo url, schemaless and no slash on end (example.org/matamo).
|
piwikTrackerUrl: "" # Matamo url, schemaless and no slash on end (example.org/matamo).
|
||||||
poweredby: true # Show powered by hugo in footer
|
poweredby: true # Show powered by hugo in footer
|
||||||
|
realfavicongenerator: # If full set of favicons, site manifest etc. exists, default false.
|
||||||
|
safariPinnedColor: # Hex color value, used in meta tags, default "#000000".
|
||||||
search: true # Site search with DuckDuckGo.
|
search: true # Site search with DuckDuckGo.
|
||||||
searchSize: 20 # Search field size, default 20.
|
searchSize: 20 # Search field size, default 20.
|
||||||
sidebar: true # Show a sidebar to the right
|
sidebar: true # Show a sidebar to the right
|
||||||
submitted: true # Show author and date information for a post.
|
submitted: true # Show author and date information for a post.
|
||||||
|
themeColor: # Hex color value, used in meta tags, default "#ffffff".
|
||||||
|
|
||||||
podcast:
|
podcast:
|
||||||
title: # * Feed title, defaults to site title (iTunes).
|
title: # * Feed title, defaults to site title (iTunes).
|
||||||
|
|
@ -190,6 +193,7 @@ The site will work without setting any of the podcast parameters but your podcas
|
||||||
|
|
||||||
## Customise
|
## Customise
|
||||||
|
|
||||||
|
|
||||||
### Logo
|
### Logo
|
||||||
|
|
||||||
Place your logo at `static/images/logo.png`. If you don't provide a logo, then the default theme logo will be used.
|
Place your logo at `static/images/logo.png`. If you don't provide a logo, then the default theme logo will be used.
|
||||||
|
|
@ -199,6 +203,8 @@ Place your logo at `static/images/logo.png`. If you don't provide a logo, then t
|
||||||
|
|
||||||
Upload your image to [RealFaviconGenerator](https://realfavicongenerator.net/) then copy-paste the generated favicon files under `static`.
|
Upload your image to [RealFaviconGenerator](https://realfavicongenerator.net/) then copy-paste the generated favicon files under `static`.
|
||||||
|
|
||||||
|
Then set the "realfavicongenerator" param to true to add the needed meta tags. Also good to set the "themeColor" and "safariPinnedColor" params to correct colours.
|
||||||
|
|
||||||
|
|
||||||
### Layouts
|
### Layouts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
{{ .Hugo.Generator }}
|
{{ .Hugo.Generator }}
|
||||||
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
|
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
|
||||||
|
<meta name="msapplication-TileColor" content="{{ $.Param "themecolor" | default "#ffffff" }}">
|
||||||
|
<meta name="theme-color" content="{{ $.Param "themecolor" | default "#ffffff" }}">
|
||||||
{{ with .Site.Params.piwikTrackerUrl }}<link rel="dns-prefetch" href="//{{ . }}">{{ end }}
|
{{ with .Site.Params.piwikTrackerUrl }}<link rel="dns-prefetch" href="//{{ . }}">{{ end }}
|
||||||
{{ with $.Param "microusername" }}<link rel="me" href="https://micro.blog/{{ . }}">{{ end }}
|
{{ with $.Param "microusername" }}<link rel="me" href="https://micro.blog/{{ . }}">{{ end }}
|
||||||
<link rel="canonical" href="{{ .Permalink }}">
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
<link rel="apple-touch-icon" href="{{ "/apple-touch-icon.png" | relURL }}">
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}">
|
||||||
|
{{ if $.Param "realfavicongenerator" -}}
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
|
||||||
|
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="{{ $.Param "safari-pinned-color" | default "#000000" }}">
|
||||||
|
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
|
||||||
|
{{ end -}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue