diff options
-rw-r--r-- | layouts/partials/favicon.html | 18 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html new file mode 100644 index 0000000..47ddd20 --- /dev/null +++ b/layouts/partials/favicon.html @@ -0,0 +1,18 @@ +{{ if .Site.Params.loadFavicon }} + {{ with .Site.Params.faviconVersion }} + {{ $.Scratch.Set "favVer" "-" }} + {{ $.Scratch.Add "favVer" . }} + {{ else }} + {{ $.Scratch.Set "favVer" "" }} + {{ end }} + + {{ $favVer := $.Scratch.Get "favVer" }} + + <link rel="apple-touch-icon-precomposed" + href='/favicon/apple-touch-icon-precomposed{{ $favVer }}.png'> + <link rel="icon" href='/favicon/favicon{{ $favVer }}.png'> + <!--[if IE]><link rel="shortcut icon" href='/favicon{{ $favVer }}.ico'><![endif]--> + <meta name="msapplication-TileColor" content="#da532c"> + <meta name="msapplication-TileImage" + content='/favicon/mstile{{ $favVer }}.png'> +{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 273bef3..11c47f8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -19,6 +19,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> {{ .Hugo.Generator }} + {{ partial "favicon" . }} + {{ with .Params.author }} <meta name="author" content="{{ . }}"> {{ end }} |