fix posts list
This commit is contained in:
parent
14b5e092f2
commit
3a780ebefe
1 changed files with 6 additions and 1 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue