Move link rel canonical from meta.html that is cached and add it directly in baseof.html

This commit is contained in:
Fredrik Jonsson 2017-05-30 12:24:38 +02:00
commit 72948a55f0
5 changed files with 4 additions and 6 deletions

View file

@ -4,7 +4,8 @@
<meta charset="utf-8">
<title>{{ block "title" . }}{{ .Title }} – {{ .Site.Title }}{{ end }}</title>
{{ block "meta" . }}{{ end }}
{{ partialCached "meta.html" . -}}
{{- partialCached "meta.html" . -}}
<link rel="canonical" href="{{ .Permalink }}">
</head>
<body class="{{ if $.Param "sidebar" | default true }}one-sidebar sidebar-second{{ else }}no-sidebars{{ end }}">

View file

@ -7,5 +7,3 @@
{{ .Content }}
</div>
</article>

View file

@ -1,5 +1,5 @@
{{ define "meta" }}
{{ partial "section_meta.html" . -}}
{{- partial "section_meta.html" . -}}
{{ end }}
{{ define "main" -}}

View file

@ -1,5 +1,5 @@
{{ define "meta" }}
{{ partial "single_meta.html" . -}}
{{- partial "single_meta.html" . -}}
{{ end }}
{{ define "main" -}}

View file

@ -4,5 +4,4 @@
{{ .Hugo.Generator }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">