forked from Sync/hugo-theme-stack
feat: add favicon from assets folder
This commit is contained in:
parent
7d838dc7fd
commit
ba3dbc4163
BIN
exampleSite/assets/img/favicon.png
Normal file
BIN
exampleSite/assets/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
exampleSite/assets/img/logo.jpg
Normal file
BIN
exampleSite/assets/img/logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -1,6 +1,7 @@
|
||||
mainSections = ["post"]
|
||||
featuredImageField = "image"
|
||||
rssFullContent = true
|
||||
favicon = "img/favicon.png"
|
||||
|
||||
[footer]
|
||||
since = 2020
|
||||
@ -16,7 +17,7 @@ subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
[sidebar.avatar]
|
||||
enabled = true
|
||||
local = true
|
||||
src = "img/avatar.png"
|
||||
src = "img/logo.jpg"
|
||||
|
||||
[article]
|
||||
math = false
|
||||
|
@ -18,7 +18,12 @@
|
||||
{{- end -}}
|
||||
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ . }}" />
|
||||
{{ $favicon := resources.Get . }}
|
||||
{{ if $favicon }}
|
||||
<link rel="shortcut icon" href="{{ $favicon.RelPermalink }}" />
|
||||
{{ else }}
|
||||
{{ errorf "Failed loading favicon from %q" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- template "_internal/google_analytics.html" . -}}
|
||||
|
Loading…
Reference in New Issue
Block a user