feat: add favicon from assets folder

This commit is contained in:
Jimmy Cai 2022-06-12 10:50:04 +00:00 committed by GitHub
parent 7d838dc7fd
commit ba3dbc4163
4 changed files with 8 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -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

View file

@ -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" . -}}