🐹 Add date format option

This commit is contained in:
koirand 2018-09-25 00:27:18 +09:00
parent af2b170429
commit a49f7bd2db
3 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{{ define "main"}}
<div>
{{ range $index, $value := .Pages.GroupByDate "January, 2006" }}
{{ range $index, $value := .Pages.GroupByDate .Site.Params.listPageDateFormat }}
{{ if (ne $index 0) }}
<hr class="separator">
{{ end }}

View file

@ -1,7 +1,7 @@
{{ define "main"}}
<div>
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format "January 2, 2006" }}</p>
<p class="date">{{ .Date.Format .Site.Params.singlePageDateFormat }}</p>
<div class="markdown-body">
{{ .Content }}
</div>