fix posts list

This commit is contained in:
morph 2020-05-26 17:39:14 +02:00
parent 14b5e092f2
commit 3a780ebefe

View file

@ -1,5 +1,6 @@
{{ define "main" }}
<main>
{{ $listtitle := .Title }}
{{ if or .Title .Content }}
<div>
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
@ -11,7 +12,11 @@
{{ range .Paginator.Pages }}
<li>
<div class="post-title">
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ if eq $listtitle "Posts" }}
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ end }}
</div>
</li>
{{ end }}