Merge pull request #19 from RPGillespie6/make_favicon_configurable

Make favicon configurable
This commit is contained in:
Radek Kozieł 2019-03-16 18:00:27 +01:00 committed by GitHub
commit 54e5006109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -81,6 +81,8 @@ paginate = 5
fullWidthTheme = false fullWidthTheme = false
# center theme with default width # center theme with default width
centerTheme = false centerTheme = false
# set a custom favicon (default is a `themeColor` square)
# favicon = "favicon.ico"
[languages] [languages]
[languages.en] [languages.en]

View File

@ -16,8 +16,10 @@
<!-- Icons --> <!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ "img/apple-touch-icon-144-precomposed.png" | absURL }}">
{{ with $.Site.Params.ThemeColor }} {{ if isset $.Site.Params "favicon" }}
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" . | absURL }}"> <link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
{{ else }}
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
{{ end }} {{ end }}
<!-- Twitter Card --> <!-- Twitter Card -->