Skip to content

Commit a1f43e9

Browse files
author
Tim Bannister
committed
Move canonical link earlier in metadata
To help search engines, make the canonical URL appear near the start of the <head> HTML element. This improves the chance of a search engine paying attention; some indexers only read part of the page and ignore information that appears later within the <head> element.
1 parent 8ff7e18 commit a1f43e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

layouts/blog/baseof.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!doctype html>
22
<html lang="{{ .Site.Language.Lang }}" class="no-js">
33
<head>
4-
{{ partial "head.html" . }}
5-
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
6-
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
74
{{ with .Params.canonicalUrl }}
85
<link rel="canonical" href="{{ . }}">
96
{{ end }}
7+
{{ partial "head.html" . }}
8+
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
9+
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
1010
</head>
1111
<body class="td-{{ .Kind }} td-blog">
1212
<header>

0 commit comments

Comments
 (0)