I’m having trouble getting the date format I want which is:
<Weekday>, <Month> <dd>, <yyyy>
Desired output:
Monday, November 9, 2021
Wednesday, December 15, 2021
On the landing page (_layouts/topics.html
), where each post is listed, this is the relevant code:
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{%- assign date_format = site.minima.date_format | default: "%A, %B %-d, %Y" -%}
{{ page.date | date: date_format }}
</time>
And the same thing appears in the posts template (_layouts/post.html
):
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{%- assign date_format = site.minima.date_format | default: "%A, %B %-d, %Y" -%}
{{ page.date | date: date_format }}
</time>
Both of these are being ignored. I can think of two possible reasons:
-
date_to_xmlschema
overrides theassign
statement, or - another minimal config file further up the chain is overriding.
Things I’ve Tried
- adding a
date:
directive to the front matter of a few*.md
files, and - adding this line to
_config.yml
—date: "%A, %B %-d, %Y"
If this isn’t enough information to allow diagnosing this problem, please let me know. Thanks in advance.