about summary refs log tree commit diff stats
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
authorAlan Pearce2017-06-10 14:21:47 +0200
committerAlan Pearce2017-06-10 14:21:47 +0200
commitf3b3cc3312db39b418cdd53d0399edc744d52c88 (patch)
tree38741a5bca61d291bfe5839a51e9b556a6ee00c3 /layouts/partials/head.html
parentd54d42df7e23d4254f76467a2142cf843d1f4a5a (diff)
downloadhyde-f3b3cc3312db39b418cdd53d0399edc744d52c88.tar.lz
hyde-f3b3cc3312db39b418cdd53d0399edc744d52c88.tar.zst
hyde-f3b3cc3312db39b418cdd53d0399edc744d52c88.zip
Remove trailing slash in post URLs
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 81c805f..e8e7596 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,5 +8,5 @@
 		<link rel="stylesheet" href="/css/syntax.css">
 		<link rel="stylesheet" href="/css/hyde.css">
 		<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}">
-		<link href="{{ .Permalink }}" rel="canonical">
+		<link href="{{ if .IsPage }}{{ .Permalink | replaceRE "/$" "" }}{{ else }}{{ .Permalink }}{{ end }}" rel="canonical">
 	</head>