diff --git a/COMMUNITY-FEATURES.md b/COMMUNITY-FEATURES.md index 8b193d58..f20b6701 100644 --- a/COMMUNITY-FEATURES.md +++ b/COMMUNITY-FEATURES.md @@ -27,3 +27,8 @@ eg: - **Support for beautiful *KaTeX* formulae** ([amtoine/hugo-theme-terminal-katex](https://github.com/amtoine/hugo-theme-terminal-katex)) - SHORT DESCRIPTION - Antoine Stevan ([@amtoine](https://github.com/amtoine)), software engineer into open source + +- **Configurable timestamping for posts** ([KatieTheDev/hugo-theme-terminal](https://github.com/KatieTheDev/hugo-theme-terminal)) + - Allows for configuring timestamping, not just datestamping + - Works with last modification dates as well + - KatieTheDev ([@KatieTheDev](https://github.com/KatieTheDev)) \ No newline at end of file diff --git a/README.md b/README.md index e3804f11..e794aedb 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,20 @@ paginate = 5 # can be overridden in a page's front-matter # TocTitle = "Table of Contents" # default + # Set date/time format for posts + # This will impact the date/time displayed on + # index.html, the posts list page, and on posts themselves + # This value can also be configured per-post on front matter + # If you have any issues with the timezone rendering differently + # than you expected, please ensure your timezone is correctly set + # on your server. + # This value can be customized according to Hugo documentation: + # https://gohugo.io/functions/time/format/ + # Default value (no changes needed): + # dateFormat = "2006-01-02" + # Example format, with date, time, and timezone abbreviation: + # dateFormat = "2006-01-02 3:04:06 PM MST" + [params.twitter] # set Twitter handles for Twitter cards diff --git a/archetypes/posts.md b/archetypes/posts.md index 9cacca3b..7064550a 100644 --- a/archetypes/posts.md +++ b/archetypes/posts.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .TranslationBaseName "-" " " | title }}" date = "{{ .Date }}" +#dateFormat = "2006-01-02" # This value can be configured for per-post date formatting author = "" authorTwitter = "" #do not include @ cover = "" diff --git a/layouts/_default/index.html b/layouts/_default/index.html index b971adf0..06dc5a57 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -23,7 +23,7 @@

{{- if .Date -}} {{- end -}} {{- with .Params.Author -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 791efce5..7ff93500 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -13,7 +13,7 @@