generate tag links with trailing slash

Since all post URIs are generated with a trailing slash, I thought
it would be a good idea to do the same for tag links. This can
save a few I/O operations here and there (or, depending on your
webhoster, even get rid of redirects).
This commit is contained in:
Stefan Foerster 2017-08-02 18:07:38 +02:00
commit 3d675e36c5
3 changed files with 7 additions and 7 deletions

View file

@ -28,14 +28,14 @@
<article class="post-preview">
<a href="{{ .Permalink }}">
<h2 class="post-title">{{ .Title }}</h2>
{{ if .Params.subtitle }}
<h3 class="post-subtitle">
{{ .Params.subtitle }}
</h3>
{{ end }}
</a>
<p class="post-meta">
{{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
</p>
@ -47,15 +47,15 @@
{{ .Content }}
{{ end }}
</div>
{{ if .Params.tags }}
<span class="post-meta">
{{ range .Params.tags }}
#<a href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
#<a href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</article>
{{ end }}
</div>