mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-22 07:45:08 +01:00
Hide date on single pages if not set
closes #31 (Hide date on single pages when not set)
This commit is contained in:
parent
20599a8119
commit
0162c21fb3
@ -2,9 +2,11 @@
|
|||||||
<div class="post">
|
<div class="post">
|
||||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">
|
{{ with .Date | default nil }}
|
||||||
{{ .Date.Format "2006-01-02" }}
|
<span class="post-date">
|
||||||
</span>
|
{{ .Format "2006-01-02" }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy }} {{ . }}</span>{{ end }}
|
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy }} {{ . }}</span>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user