layout: improve dates logic
* BETTER Improves a test to display lastmod only if it's bigger than publishdate. Co-Authored-by: Igor Milhit <igor@milhit.ch>pull/31/head
parent
f3189b4478
commit
74181ecd54
|
@ -1,6 +1,6 @@
|
|||
<ul class="post-info">
|
||||
<li>Publié le : {{ dateFormat "2006-01-02" (default .Date (.PublishDate)) }}</li>
|
||||
{{ if isset .Params "lastmod" }}
|
||||
{{ if (and (isset .Params "lastmod") (gt .Lastmod .PublishDate)) }}
|
||||
<li>Dernière mise à jour : {{ .Lastmod.Format "2006-01-02" }}</li>
|
||||
{{ end }}
|
||||
{{ with .Params.categories }}
|
||||
|
|
Loading…
Reference in New Issue