Added new dateFormat and set visible dates to reference it. Defaults to existing format: 2006-01-02.
This commit is contained in:
parent
9d458d193f
commit
0f6b97db32
@ -143,6 +143,9 @@ paginate = 5
|
|||||||
# With this option you don't have to put the `cover` param in a front-matter.
|
# With this option you don't have to put the `cover` param in a front-matter.
|
||||||
autoCover = true
|
autoCover = true
|
||||||
|
|
||||||
|
# Provide a string as a date format. By default, 2006-01-02. See https://pkg.go.dev/github.com/vigneshuvi/GoDateFormat "Constants and Placeholders" for more information.
|
||||||
|
dateFormat = "01-02-2006"
|
||||||
|
|
||||||
# set post to show the last updated
|
# set post to show the last updated
|
||||||
# If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated
|
# If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated
|
||||||
showLastUpdated = false
|
showLastUpdated = false
|
||||||
|
@ -9,6 +9,7 @@ paginate = 5
|
|||||||
showMenuItems = 2
|
showMenuItems = 2
|
||||||
fullWidthTheme = false
|
fullWidthTheme = false
|
||||||
centerTheme = false
|
centerTheme = false
|
||||||
|
dateFormat = "2006-01-02"
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format $.Site.Params.dateFormat }}
|
||||||
</span>
|
</span>
|
||||||
{{ with .Params.Author }}
|
{{ with .Params.Author }}
|
||||||
<span class="post-author">:: {{ . }}</span>
|
<span class="post-author">:: {{ . }}</span>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format $.Site.Params.dateFormat }}
|
||||||
</span>
|
</span>
|
||||||
{{ with .Params.Author }}
|
{{ with .Params.Author }}
|
||||||
<span class="post-author">:: {{ . }}</span>
|
<span class="post-author">:: {{ . }}</span>
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{ if .Params.Date }}
|
{{ if .Params.Date }}
|
||||||
<span class="post-date">
|
<span class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format $.Site.Params.dateFormat }}
|
||||||
{{ if $.Site.Params.showLastUpdated }}
|
{{ if $.Site.Params.showLastUpdated }}
|
||||||
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
|
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format $.Site.Params.dateFormat }}]
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user