mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-28 04:23:51 +01:00
feat: add favicon from assets folder
This commit is contained in:
parent
7d838dc7fd
commit
ba3dbc4163
4 changed files with 8 additions and 2 deletions
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 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 a new issue