summaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
authorArpit Gupta <gigaarpit@gmail.com>2024-07-19 16:17:53 +0530
committerGitHub <noreply@github.com>2024-07-19 16:17:53 +0530
commite8d86c7d4c3f6e899bad18d2103efaead87149a4 (patch)
tree69bd2f6bab92a74d3b34e4c231c07c2eb1496310 /layouts/partials/head.html
parent06f49d396c2146c1865a4f04834c6dca871c57cc (diff)
Implement Canonical URL
This change adds canonical URL to all pages. Reference: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls#rel-canonical-link-method
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index cdd766a..bf00a74 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,9 +15,11 @@
{{ end }}
</title>
+<link rel="canonical" href="{{ .Permalink }}" />
+
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
{{ if hugo.IsProduction }}
{{ template "_internal/google_analytics.html" . }}
-{{ end }} \ No newline at end of file
+{{ end }}