From 0f6b97db32dc2c998b3eb515dbb1723641cd6613 Mon Sep 17 00:00:00 2001 From: Jordan Brough Date: Sun, 6 Mar 2022 14:11:38 -0700 Subject: [PATCH] Added new dateFormat and set visible dates to reference it. Defaults to existing format: 2006-01-02. --- README.md | 3 +++ exampleSite/config.toml | 1 + layouts/_default/index.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 582fd65..c6719e5 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,9 @@ paginate = 5 # With this option you don't have to put the `cover` param in a front-matter. 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 # If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated showLastUpdated = false diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a06270a..25fa46c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,6 +9,7 @@ paginate = 5 showMenuItems = 2 fullWidthTheme = false centerTheme = false + dateFormat = "2006-01-02" [languages] [languages.en] diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 1cab615..80eee32 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -21,7 +21,7 @@
{{ with .Params.Author }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 02f69b4..85733a1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,7 +12,7 @@