about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/head.html2
3 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index a9f903c..948a5e6 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -5,7 +5,7 @@
 			<ul class="posts">
 				{{ range .Data.Pages }}
 				<li itemscope itemtype="http://schema.org/BlogPosting">
-					<a class="post-title" itemprop="url" href="{{ .RelPermalink }}"><span itemprop="name">{{ .Title }}<span></a>
+					<a class="post-title" itemprop="url" href="{{ .RelPermalink | replaceRE "/$" "" }}"><span itemprop="name">{{ .Title }}<span></a>
 					<time class="post-date" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
 				</li>
 				{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 05337f0..69f35fa 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -6,7 +6,7 @@
 				<ul class="posts">
 					{{ range first 10 .Data.Pages }}
 					<li itemscope itemtype="http://schema.org/BlogPosting">
-						<a class="post-title" itemprop="url" href="{{ .RelPermalink }}"><span itemprop="name">{{ .Title }}</span></a>
+						<a class="post-title" itemprop="url" href="{{ .RelPermalink | replaceRE "/$" "" }}"><span itemprop="name">{{ .Title }}</span></a>
 						<time class="post-date" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time>
 					</li>
 					{{ end }}
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>