Merge partials for head and add logic so they can be added once in baseof instead of in each single and list template.

This commit is contained in:
Fredrik Jonsson 2019-07-05 13:14:02 +02:00
commit 9eea6f46a9

View file

@ -1,3 +1,14 @@
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta name="description" content="{{ if .IsPage }}{{ .Description | default (replaceRE "\n" " " .Summary) }}{{ else }}{{ $.Param "description" }}{{ end }}">
<meta name="created" content="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">
<meta name="modified" content="{{ .Lastmod.Format "2006-01-02T15:04:05-0700" }}">
{{ with $.Param "author" }}<meta name="author" content="{{ . }}">{{ end }}
<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:url" content="{{ .Permalink }}">
{{ with $.Param "image" }}<meta name="og:image" content="{{ . | absURL }}">{{ end }}
{{ hugo.Generator }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<meta name="msapplication-TileColor" content="{{ $.Param "themecolor" | default "#ffffff" }}">