diff options
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/single.html | 2 | ||||
| -rw-r--r-- | layouts/partials/post-entry.html | 9 | 
2 files changed, 5 insertions, 6 deletions
| diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4398ce5..0538658 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -34,7 +34,7 @@              {{- end }}              {{- if .Param "readTime" }} -                ·   +              {{ if .Date }}  ·  {{ end }}                {{- .ReadingTime }} min read              {{- end }}              </p> diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html index 1f57f23..ac1386b 100644 --- a/layouts/partials/post-entry.html +++ b/layouts/partials/post-entry.html @@ -1,11 +1,10 @@  <div class="post-line"> -    {{ $dateFormat := "2 Jan 2006"}} -    {{ with .Site.Params.listDateFormat }} -    {{ $dateFormat = .}} -    {{ end }} +    {{ $dateFormat := .Site.Params.listDateFormat | default "2 Jan 2006" }} -    <p class="line-date">{{ .Date | time.Format $dateFormat }} </p> +    {{ if .Parent.Param "showListDate" | default true }} +        <p class="line-date">{{ .Date | time.Format $dateFormat }} </p> +    {{ end }}      <div>          <p class="line-title"> | 
