Default date format if not defined in config.toml

Default date format if not defined in config.toml
This commit is contained in:
Michael Romero 2017-03-25 20:10:19 -07:00
commit 4d866ddfd7
3 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@
{{ end }}
{{ end }}
{{ if eq .Type "post" }}
<span class="post-meta">Posted on {{ .Date.Format .Site.Params.dateFormat }}</span>
<span class="post-meta">Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }}</span>
{{ end }}
</div>
</div>
@ -57,7 +57,7 @@
{{ end }}
{{ end }}
{{ if eq .Type "post" }}
<span class="post-meta">Posted on {{ .Date.Format .Site.Params.dateFormat }}</span>
<span class="post-meta">Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }}</span>
{{ end }}
</div>
</div>