diff options
author | Francesco Tomaselli <tomaselli.fr@gmail.com> | 2024-09-02 22:50:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 22:50:26 +0200 |
commit | 13bb965eece805f795397fd7548c2458f96c7935 (patch) | |
tree | b6465dce40125a2b93228b97378080ac24207f8e /layouts | |
parent | 3c6711f6c3b0c2f8fe857414678d85fb3d1e06dc (diff) | |
parent | 368c529f1eb76aab856d7117f81811fdae672f4e (diff) |
Merge pull request #18 from vxnick/override-single-datetime
Allow the date/time format on the single template to be overridden
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8b01d4c..9282d4e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,7 +22,7 @@ <p class="single-readtime"> {{ with .Date }} {{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := . | time.Format ":date_long" }} + {{ $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> {{end}} @@ -88,4 +88,4 @@ </div> -{{ end }}
\ No newline at end of file +{{ end }} |