mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 14:42:54 +00:00
Show date in lists only if set by page (#154)
This commit is contained in:
parent
770fd5c0a6
commit
4c19d875de
2 changed files with 12 additions and 0 deletions
|
@ -5,9 +5,15 @@
|
|||
<div class="container">
|
||||
<ul>
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
{{ if .Date }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -6,9 +6,15 @@
|
|||
<div class="container">
|
||||
<ul>
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
{{ if .Date }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue