Add favicons partial support

pull/2/head
James Panther 2021-08-14 10:47:33 +10:00
parent 93bb7e5f00
commit ad0fe1db15
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 12 additions and 9 deletions

View File

@ -18,12 +18,11 @@
<a class="hover:underline" href="https://git.io/hugo-congo" target="_blank">Congo</a>
</p>
{{ end }}
</footer>
{{/* Extend footer - eg. for extra scripts, etc. */}}
{{ if templates.Exists "partials/extend-footer.html" }}
{{ partialCached "extend-footer.html" . }}
{{ end }}
</footer>
{{/* Include mermaid.js only on pages that use the shortcode */}}
{{- if (in (string .Content) "class=\"mermaid\"") -}}

View File

@ -29,10 +29,14 @@
<link type="text/css" rel="stylesheet" href="{{ "css/custom.css" | absURL }}" />
{{- end }}
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }}
{{ else }}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/favicon-32x32.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/favicon-16x16.png" | absURL }}" />
<link rel="manifest" href="{{ "/site.webmanifest" | absURL }}" />
{{ end }}
{{/* Site Verification */}}
{{ with .Site.Params.verification.google }}
<meta name="google-site-verification" content="{{ . }}" />