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
parent 625176f1ce
commit 4d866ddfd7
3 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@
</a>
<p class="post-meta">
Posted on {{ .Date.Format .Site.Params.dateFormat }}
Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }}
</p>
<div class="post-entry">
{{ if .Truncated }}

View File

@ -31,7 +31,7 @@
</a>
<p class="post-meta">
Posted on {{ .Date.Format .Site.Params.dateFormat }}
Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }}
</p>
<div class="post-entry">
{{ if .Truncated }}

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>