1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-08-05 21:37:37 +00:00
Files
Yura 01c62bc636 fix(dom): add missing datetime attribute on time element (#2759)
The datetime attribute was missing from the time element, which is
recommended for semantic HTML. Add it using the date_to_xmlschema
Liquid filter to ensure proper ISO 8601 format.
2026-06-29 07:16:49 +08:00

21 lines
585 B
HTML

<!--
Date format snippet
See: ${JS_ROOT}/modules/components/locale-datetime.js
-->
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
<time
{% if include.class %}
class="{{ include.class }}"
{% endif %}
datetime="{{ include.date | date_to_xmlschema }}"
data-df="{{ df_dayjs }}"
{% if include.tooltip %}
data-bs-toggle="tooltip" data-bs-placement="bottom"
{% endif %}
>
{{ include.date | date: df_strftime }}
</time>