diff options
author | Alan Pearce | 2017-06-17 17:49:45 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-17 17:49:45 +0200 |
commit | 987cab567c5fc9bed00bf11b8693b44d40564e5e (patch) | |
tree | 1ab56d779e8b335f37554bc21dea0977277add3f /layouts | |
parent | 1a1d3f173ea77f8d74cc04b4abf37f3ef02330cf (diff) | |
download | hyde-987cab567c5fc9bed00bf11b8693b44d40564e5e.tar.lz hyde-987cab567c5fc9bed00bf11b8693b44d40564e5e.tar.zst hyde-987cab567c5fc9bed00bf11b8693b44d40564e5e.zip |
Add canonical u-urls to posts
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 948a5e6..e401596 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 | replaceRE "/$" "" }}"><span itemprop="name">{{ .Title }}<span></a> + <a class="post-title u-url" itemprop="url" href="{{ .Permalink | 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/_default/single.html b/layouts/_default/single.html index 5bd829f..a3ecf61 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,7 +3,9 @@ <main class="content container" role="main"> <article class="post"> <header> - <h1 class="post-title p-name" itemprop="name">{{ .Title }}</h1> + <a class="u-url" href="{{ .Permalink | replaceRE "/$" "" }}"> + <h1 class="post-title p-name" itemprop="name">{{ .Title }}</h1> + </a> <time class="post-date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}" itemprop="datePublished">{{ .Date.Format "Monday, 2 January 2006" }}</time> </header> <main class="post-content e-content" itemprop="articleBody"> |