diff --git a/config.toml b/config.toml index b03451a..17f88f5 100644 --- a/config.toml +++ b/config.toml @@ -34,6 +34,9 @@ accent_color = "blue" # Defaults to accent color (or, if not accent color specified, to blue). background_color = "blue" +# Format of the post date - defaults to "2025-01-13". +post_date_format = "%Y-%m-%d" + # The logo text - defaults to "Terminimal theme" logo_text = "Terminimal theme" diff --git a/templates/macros/post.html b/templates/macros/post.html index 5ea20d1..80cbdc8 100644 --- a/templates/macros/post.html +++ b/templates/macros/post.html @@ -26,7 +26,7 @@ {% macro date(page) %} {%- if page.date %} - {{ page.date | date(format="%Y-%m-%d") }} + {{ page.date | date(format=config.extra.post_date_format) }} {% endif -%} {% endmacro post_date %} diff --git a/theme.toml b/theme.toml index 5dbccf7..b24b1dd 100644 --- a/theme.toml +++ b/theme.toml @@ -30,6 +30,9 @@ accent_color = "blue" # Defaults to accent color (or, if not accent color specified, to blue). background_color = "blue" +# Format of the post date - defaults to "2025-01-13". +post_date_format = "%Y-%m-%d" + # The logo text - defaults to 2 non-breaking spaces. logo_text = "Terminimal theme"