feat(head): add favicon support

This commit is contained in:
Jimmy Cai
2020-08-23 11:32:53 +02:00
parent 901d1f63fc
commit 8476bd0160
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -15,4 +15,10 @@
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ 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>