layouts: surpress date section when date is not set

main
Ariadne Conill 4 months ago
parent 2ccaa8cbf9
commit 83b1af5361
  1. 2
      layouts/_default/single.html

@ -4,11 +4,13 @@
<div class="e-content">
{{ .Content }}
</div>
{{ if .Date }}
<p>
Published on
<a class="u-url" href="{{ .Permalink }}">
<time class="dt-published" datetime="{{ .Date }}">{{ .Date.Format "Jan 2, 2006" }}</time>
</a>
</p>
{{ end }}
</article>
{{ end }}

Loading…
Cancel
Save