diff options
author | Alan Pearce | 2020-04-04 22:52:48 +0200 |
---|---|---|
committer | Alan Pearce | 2020-04-04 23:02:37 +0200 |
commit | 2a226bc9543a032b03fd990dce05dbae5ec32415 (patch) | |
tree | 3043a27f7875586d3b45949398772a387f31c031 | |
parent | 8568ada6ddde91e4cd53ae2351385bca4d7d6531 (diff) | |
download | website-2a226bc9543a032b03fd990dce05dbae5ec32415.tar.lz website-2a226bc9543a032b03fd990dce05dbae5ec32415.tar.zst website-2a226bc9543a032b03fd990dce05dbae5ec32415.zip |
Simplify permalink handling
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/hook_head_end.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html index 18f6806..ad04a63 100644 --- a/layouts/index.html +++ b/layouts/index.html | |||
@@ -8,7 +8,7 @@ | |||
8 | <ul> | 8 | <ul> |
9 | {{- range first 3 .Site.RegularPages }} | 9 | {{- range first 3 .Site.RegularPages }} |
10 | <li class="h-entry"> | 10 | <li class="h-entry"> |
11 | <a class="u-url p-name" href="{{ .RelPermalink | strings.TrimRight "/" }}">{{ .Title }}</a> | 11 | <a class="u-url p-name" href="{{ .RelPermalink }}">{{ .Title }}</a> |
12 | <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> | 12 | <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> |
13 | </li> | 13 | </li> |
14 | {{- end }} | 14 | {{- end }} |
diff --git a/layouts/partials/hook_head_end.html b/layouts/partials/hook_head_end.html index 13e0ec6..0f89f7d 100644 --- a/layouts/partials/hook_head_end.html +++ b/layouts/partials/hook_head_end.html | |||
@@ -1,2 +1,2 @@ | |||
1 | <link href="{{ if .IsPage }}{{ .Permalink | replaceRE "/$" "" }}{{ else }}{{ .Permalink }}{{ end }}" rel="canonical"> | 1 | <link href="{{ if .IsPage }}{{ .Permalink | strings.TrimRight "/" }}{{ else }}{{ .Permalink }}{{ end }}" rel="canonical"> |
2 | <meta name="googlebot" content="noindex"> | 2 | <meta name="googlebot" content="noindex"> |