diff options
author | Akira Baruah <akira.baruah@gmail.com> | 2021-04-05 23:47:59 -0700 |
---|---|---|
committer | Jan Raasch <jan@janraasch.com> | 2021-04-12 17:18:41 +0200 |
commit | be0ba327e3a0615d81e58e77c88a67682df01b77 (patch) | |
tree | f720f2ffa405cd34706512d7fb68409ba80cebc4 /exampleSite | |
parent | b1fc6d298f7206b0e33f15b159fcd253f118f8c5 (diff) | |
download | hugo-bearcub-be0ba327e3a0615d81e58e77c88a67682df01b77.tar.gz hugo-bearcub-be0ba327e3a0615d81e58e77c88a67682df01b77.tar.bz2 |
feat: enable optional custom date format
Adds a .Site.Params.dateFormat setting to let users specify a Hugo-style
date format string for content. Previously, the date format was
hardcoded to "02 Jan, 2006", presumably to match the original BearBlog
style. This format gets used by default if the new "dateFormat" setting
is absent from the site config.
Diffstat (limited to 'exampleSite')
-rw-r--r-- | exampleSite/config.toml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index c92d0a9..5aa964b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -42,3 +42,10 @@ ignoreErrors = ["error-disable-taxonomy"] # This theme will, by default, inject a made-with-line at the bottom of the page. # You can turn it off, but we would really appreciate if you don’t :-). # hideMadeWithLine = true + + # By default, this theme displays dates with a format like "02 Jan, 2006", but + # you can customize it by setting the `dateFormat` param in your site's config + # file. See [Hugo's Format function docs](https://gohugo.io/functions/format/) + # for details. An example TOML config that uses [ISO + # 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + # dateFormat = "2006-01-02" |