I'm trying to set a post date in a site using casper theme.
In the casper theme code, I can see that the date is parsed using:
{{ page.date|date('F d. Y.') }}
So I assumed that setting the header of my post as the following would display the appropriate date in the post page. Instead, it's displaying today's date. So it seems it's taking as date when I last modified the post's markdown file.
----
template: item
title: Some blogpost
date: 2022-01-06
---
Please note that I have the appropriate date format in my config/system.yaml file:
dateformat:
default: Y-m-d
short: Y-m-d
long: Y-m-d_H:i
Anyone has an idea why the date is not displaying as it should?
In a custom theme, I used the following twig expression and it's behaving as expected:
{{ page.header.date|date(system.pages.dateformat.short) }}
I would really like to avoid having to customize the casper theme to achieve this behaviour which seem to me like it would be the expected one.
Or did I misunderstand something?