BREAKING: Only show date in lists if showdate is set to true in _index.md

This commit is contained in:
BBaoVanC 2021-09-27 20:47:39 -05:00
parent 58fbdafc10
commit 28a10e1dc4
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -8,9 +8,10 @@
<h1>{{ .Title | markdownify }}</h1>
{{ end }}
<ul>
{{ $showDate := .Params.showdate }}
{{ range .Pages }}
<li>
{{ if .Date }}
{{ if $showDate }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ .Date.Format "2006-01-02" }}
</time>