Add dateFormat option. Close #5

This commit is contained in:
Dmitry Kolosov 2020-05-24 22:55:32 +03:00
parent 63b73e6d2b
commit 391fe8e5b1
3 changed files with 13 additions and 2 deletions

View file

@ -1,6 +1,11 @@
{{ $dateFormat := "2006-01-02" }}
{{ if .Site.Params.dateFormat }}
{{ $dateFormat = .Site.Params.dateFormat }}
{{ end }}
<div class="article-info">
{{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
<div class="article-date">{{ .Params.date.Format $dateFormat }}</div>
{{ end }}
<div class="article-taxonomies">
{{ if .Params.categories }}