diff options
author | vanhumbeecka <vanhumbeecka@users.noreply.github.com> | 2021-04-30 20:53:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 20:53:28 +0300 |
commit | d73bf1670ca74dcfbb0597891e26e2c0e28242e9 (patch) | |
tree | eb53d3acaaefa014053babe7b69c63ce0187dfee | |
parent | 542495d542d2f8b2a2fe5949d58fee61559debb6 (diff) |
Update head.html
Add an optional canonical URL as a link tag. See [here](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls#expandable-5) for more info regarding this tag. Useful for when reposting an existing article, and pointing to the original.
-rw-r--r-- | layouts/partials/head.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d1d897d..ed5ddad 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -41,10 +41,14 @@ {{if .Site.Params.manifest}} <link rel="manifest" href="{{.Site.Params.manifest}}"> {{end}} + +{{if .Params.canonicalUrl}} +<link rel="canonical" href="{{.Params.canonicalUrl}}" /> +{{end}} +<!-- favicon --> {{ if .Site.Params.favicon }} <link rel="icon" href="{{ .Site.Params.favicon | absURL }}"> -<!-- favicon --> {{ end }} {{ $styles := resources.Get "scss/journal.scss" | toCSS | minify | fingerprint }} |