Add datetime attribute to time elements
This commit is contained in:
parent
b0bc736a7e
commit
fb94864b15
@ -12,7 +12,7 @@ pagination:
|
|||||||
{% for item in pagination.items %}
|
{% for item in pagination.items %}
|
||||||
<li class="stack-xs">
|
<li class="stack-xs">
|
||||||
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered | safe }}</a></h2>
|
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered | safe }}</a></h2>
|
||||||
<time class="block">{{ item.date | parseDate | dateDisplay }}</time>
|
<time class="block" datetime="{{ item.date }}">{{ item.date | parseDate | dateDisplay }}</time>
|
||||||
{{ item.excerpt.rendered | safe }}
|
{{ item.excerpt.rendered | safe }}
|
||||||
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
|
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -17,7 +17,7 @@ eleventyComputed:
|
|||||||
{% for item in tag.posts %}
|
{% for item in tag.posts %}
|
||||||
<li class="stack-xs">
|
<li class="stack-xs">
|
||||||
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered | safe }}</a></h2>
|
<h2><a href="/post/{{ item.slug }}">{{ item.title.rendered | safe }}</a></h2>
|
||||||
<time class="block">{{ item.date | parseDate | dateDisplay }}</time>
|
<time datetime="{{ post.date }}" class="block">{{ item.date | parseDate | dateDisplay }}</time>
|
||||||
{{ item.excerpt.rendered | safe }}
|
{{ item.excerpt.rendered | safe }}
|
||||||
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
|
<a href="/post/{{ item.slug }}" class="inline-block">Read more</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -26,7 +26,7 @@ layout: base.njk
|
|||||||
|
|
||||||
<ul class="stack-2xs" role='list'>
|
<ul class="stack-2xs" role='list'>
|
||||||
{% for post in posts | take(3) %}
|
{% for post in posts | take(3) %}
|
||||||
<li><a href="/post/{{ post.slug }}">{{ post.title.rendered | safe }}</a> <time>{{ post.date | dateDisplay }}</time></li>
|
<li><a href="/post/{{ post.slug }}">{{ post.title.rendered | safe }}</a> <time datetime="{{ post.date }}">{{ post.date | dateDisplay }}</time></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user