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"]
|
mainSections = ["post"]
|
||||||
featuredImageField = "image"
|
featuredImageField = "image"
|
||||||
rssFullContent = true
|
rssFullContent = true
|
||||||
|
favicon = "img/favicon.png"
|
||||||
|
|
||||||
[footer]
|
[footer]
|
||||||
since = 2020
|
since = 2020
|
||||||
@ -16,7 +17,7 @@ subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|||||||
[sidebar.avatar]
|
[sidebar.avatar]
|
||||||
enabled = true
|
enabled = true
|
||||||
local = true
|
local = true
|
||||||
src = "img/avatar.png"
|
src = "img/logo.jpg"
|
||||||
|
|
||||||
[article]
|
[article]
|
||||||
math = false
|
math = false
|
||||||
|
@ -18,7 +18,12 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ with .Site.Params.favicon }}
|
{{ 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 }}
|
{{ end }}
|
||||||
|
|
||||||
{{- template "_internal/google_analytics.html" . -}}
|
{{- template "_internal/google_analytics.html" . -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user