Make favicon configurable

Fix #18
This commit is contained in:
RPGillespie6 2019-03-12 21:40:07 -04:00 committed by Bryan Gillespie
parent 9928ada9ad
commit 27462e1893
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 -->