#113, Hide date from posts if not specified
This commit is contained in:
parent
e01674c287
commit
c4232b6e28
2 changed files with 16 additions and 12 deletions
|
@ -2,13 +2,15 @@
|
||||||
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
|
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
|
||||||
{{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
|
{{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
|
||||||
{{ range sort .Paginator.Pages }}
|
{{ range sort .Paginator.Pages }}
|
||||||
<article class="markdown">
|
<article class="markdown book-post">
|
||||||
<h2>
|
<h2>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
{{ with .Date }}
|
||||||
<h5>
|
<h5>
|
||||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
<strong>{{ .Format $dateFormat }}</strong>
|
||||||
</h5>
|
</h5>
|
||||||
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
{{- .Summary -}}
|
{{- .Summary -}}
|
||||||
{{ if .Truncated }}
|
{{ if .Truncated }}
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
|
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
|
||||||
<header class="markdown">
|
<header class="markdown">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ with .Date }}
|
||||||
<h5>
|
<h5>
|
||||||
<strong>{{ .Date.Format $dateFormat }}</strong>
|
<strong>{{ .Format $dateFormat }}</strong>
|
||||||
</h5>
|
</h5>
|
||||||
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
<article class="markdown">
|
<article class="markdown">
|
||||||
{{- .Content -}}
|
{{- .Content -}}
|
||||||
|
|
Loading…
Reference in a new issue