{{- $faviconIco := site.Params.favicon -}}
{{- $faviconPng := site.Params.faviconPng -}}
{{- if or $faviconIco $faviconPng -}}
{{- /* ICO (shortcut / legacy) */ -}}
{{- if $faviconIco -}}
{{- if or (hasPrefix $faviconIco "http") (fileExists (add `static/` (string $faviconIco))) -}}
{{- else if fileExists (add `assets/` (string $faviconIco)) -}}
{{- $ico := resources.Get $faviconIco -}}
{{- end -}}
{{- end -}}
{{- /* PNG / Apple touch */ -}}
{{- if $faviconPng -}}
{{- if or (hasPrefix $faviconPng "http") (fileExists (add `static/` (string $faviconPng))) -}}
{{- else if fileExists (add `assets/` (string $faviconPng)) -}}
{{- $png := resources.Get $faviconPng -}}
{{- $png48 := $png.Resize "48x png" -}}
{{- $png96 := $png.Resize "96x png" -}}
{{- $png180 := $png.Resize "180x png" -}}
{{- end -}}
{{- end -}}
{{- end -}}