mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
feat(head): add favicon support
This commit is contained in:
parent
901d1f63fc
commit
8476bd0160
2 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,7 @@ paginate = 5
|
||||||
avatar = "img/avatar.jpg"
|
avatar = "img/avatar.jpg"
|
||||||
subtitle = "和世界分享刚编的破事"
|
subtitle = "和世界分享刚编的破事"
|
||||||
postLicense = "Licenced under CC BY-NC-SA 4.0"
|
postLicense = "Licenced under CC BY-NC-SA 4.0"
|
||||||
|
favicon = ""
|
||||||
[params.widgets]
|
[params.widgets]
|
||||||
enabled = ['archive', 'tag-cloud']
|
enabled = ['archive', 'tag-cloud']
|
||||||
[params.widgets.tagCloud]
|
[params.widgets.tagCloud]
|
||||||
|
|
|
@ -15,4 +15,10 @@
|
||||||
{{ range .AlternativeOutputFormats -}}
|
{{ range .AlternativeOutputFormats -}}
|
||||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
{{- if .Site.Params.favicon -}}
|
||||||
|
{{- $logo := resources.Get .Site.Params.favicon -}}
|
||||||
|
{{- $favicon := $logo.Resize "32x" -}}
|
||||||
|
<link rel="icon" type="image/png" href="{{ $favicon.RelPermalink }}" />
|
||||||
|
{{- end -}}
|
||||||
</head>
|
</head>
|
Loading…
Reference in a new issue