This commit is contained in:
Andrew Borg (Kashin) 2025-01-13 14:43:31 +00:00 committed by GitHub
commit 2b1187afe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 1 deletions

View file

@ -348,6 +348,16 @@ page_titles = "combined"
All the configuration options are also described in
[`config.toml`](../master/config.toml).
### Post date format
You can customize the format of the post date by adding:
```toml
[extra]
# Overwrite the format to Jan 13, 2025.
post_date_format = "%b %d, %Y"
```
## Extending
Each of the templates defines named blocks, so

View file

@ -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"

View file

@ -26,7 +26,7 @@
{% macro date(page) %}
<span class="post-date">
{%- if page.date %}
{{ page.date | date(format="%Y-%m-%d") }}
{{ page.date | date(format=config.extra.post_date_format) }}
{% endif -%}
</span>
{% endmacro post_date %}

View file

@ -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"