mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-22 07:45:08 +01:00
Merge pull request #40 from da-moo/master
Add configuration option to change date format
This commit is contained in:
commit
1cfec04653
@ -97,6 +97,8 @@ paginate = 5
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
minuteReadingTime = "min read"
|
||||
dateFormatSingle = "2006-01-02"
|
||||
dateFormatList = "2006-01-02"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
|
@ -26,6 +26,8 @@ paginate = 5
|
||||
newerPosts = "Newer posts"
|
||||
olderPosts = "Older posts"
|
||||
minuteReadingTime = "min read"
|
||||
dateFormatSingle = "2006-01-02"
|
||||
dateFormatList = "2006-01-02"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
|
@ -9,7 +9,7 @@
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="post-meta">
|
||||
{{ with .Date | default nil }}
|
||||
<span class="post-date">
|
||||
{{ .Format "2006-01-02" }}
|
||||
{{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user