Made dateFormat configurable in config.toml

This commit is contained in:
Li-Wen Yip 2017-03-04 14:33:31 +00:00
parent 44bdb457db
commit d5de1306d0
4 changed files with 4 additions and 3 deletions

View File

@ -12,6 +12,7 @@ pygmentCodeFences = true
logo = "img/avatar-icon.png" logo = "img/avatar-icon.png"
favicon = "img/favicon.ico" favicon = "img/favicon.ico"
commit = false commit = false
dateFormat = "January 2, 2006"
[[Params.bigimg]] [[Params.bigimg]]
src = "img/path.jpg" src = "img/path.jpg"

View File

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

View File

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

View File

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