Add canonical URL link in header.html
By default the page permalink is used, if necessary a custom canonicalUrl parameter can be set in a page front matter.
This commit is contained in:
parent
50558ed9bb
commit
4faf3de554
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,10 @@
|
|||
<head>
|
||||
<link href="https://gmpg.org/xfn/11" rel="profile">
|
||||
{{ if .Params.canonicalUrl }}
|
||||
<link rel="canonical" href="{{ .Params.canonicalUrl }}">
|
||||
{{ else }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
{{ partial "header/meta.html" . }}
|
||||
{{ partial "header/styles.html" . }}
|
||||
{{ `<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
|
|
Loading…
Reference in a new issue