From 44fdec2a2291128162f1bfcc6d4ed47ba97f633f Mon Sep 17 00:00:00 2001
From: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Date: Thu, 13 Jul 2023 12:14:56 +0000
Subject: [PATCH] Utilize canonical URLs if specified in front matter (#827)
---
layouts/partials/head.html | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6637bd6..e9cad8b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,6 +1,8 @@
{{ partial "head/meta-tags.html" . }}
-{{ if .Permalink }}
+{{ if .Params.canonicalUrl }}
+<link rel="canonical" href="{{ .Params.canonicalUrl }}">
+{{ else }}
<link rel="canonical" href="{{ .Permalink }}">
{{ end }}
--
Gitblit v1.10.0