diff options
author | Huy Tran <hoang.huy.tran@gmail.com> | 2021-04-19 09:10:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 09:10:05 +0300 |
commit | 14b387e6663c91750f0d80cc4cb17659d5979758 (patch) | |
tree | 3705a2aad4312d3b31db35c52d3450c0c627bbe5 | |
parent | 50558ed9bb03d3d8e84ddcb1b76b8f582e388308 (diff) | |
parent | 4faf3de5540dc3f7ecfcd1463e015cfe73492967 (diff) |
Merge pull request #134 from silvanocerza/canonical-url
Add canonical URL link in header.html
-rw-r--r-- | layouts/partials/header.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 4d918e1..2c7cfad 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -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 --> |