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

View File

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

View File

@ -32,7 +32,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if eq .Type "post" }} {{ 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 }} {{ end }}
</div> </div>
</div> </div>
@ -57,7 +57,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if eq .Type "post" }} {{ 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 }} {{ end }}
</div> </div>
</div> </div>