Use <time> element and datetime attribute for post and article dates
This commit is contained in:
parent
ca2d915f44
commit
bef0ef34b6
|
@ -18,9 +18,12 @@
|
|||
{% if isArticle %}
|
||||
<div class="article__info">
|
||||
<p class="article__info--desc">{{ desc }}</p>
|
||||
<p>{{ content | wordcount | thousands }} words. Posted on {{ date | formatDate }} by {{ sitemeta.siteAuthor.name }}</p>
|
||||
<p>
|
||||
{{ content | wordcount | thousands }} words.
|
||||
Posted on <time datetime="{{ date }}">{{ date | formatDate }}</time> by {{ sitemeta.siteAuthor.name }}
|
||||
</p>
|
||||
{% if updated %}
|
||||
<p>Last updated on {{ updated | formatDate }}</p>
|
||||
<p>Last updated on <time datetime="{{ updated }}">{{ updated | formatDate }}</time></p>
|
||||
{% endif %}
|
||||
{% if categories %}
|
||||
<p>Categories:
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{% endif %}
|
||||
</a>
|
||||
</p>
|
||||
<p>{{ content.date | formatDate }}</p>
|
||||
<time datetime="{{ content.date }}">{{ content.date | formatDate }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -33,7 +33,7 @@ isContentDivided: true
|
|||
{{ group.templateContent | safe }}
|
||||
|
||||
{% if group.data.updated %}
|
||||
<p class="update-info">(This {{ group.data.title }} list was last updated on {{ group.data.updated | formatDate }})</p>
|
||||
<p class="update-info">(This {{ group.data.title }} list was last updated on <time datetime="{{ group.data.updated }}">{{ group.data.updated | formatDate }}</time>)</p>
|
||||
{% endif %}
|
||||
<a href="#linktabs" class="tab__btn tab__back">Back to tabs</a>
|
||||
</section>
|
||||
|
|
|
@ -4,4 +4,4 @@ layout: main/content
|
|||
|
||||
{{ content | safe }}
|
||||
|
||||
<p class="update-info">(This {{ keyword }} was last updated on {{ updated | formatDate }})</p>
|
||||
<p class="update-info">(This {{ keyword }} was last updated on <time datetime="{{ updated }}">{{ updated | formatDate }}</time>)</p>
|
|
@ -20,7 +20,7 @@ eleventyNavigation:
|
|||
{% endif %}
|
||||
</a>
|
||||
</h2>
|
||||
<p>{{ post.date | formatDate }}</p>
|
||||
<time datetime="{{ post.date }}">{{ post.date | formatDate }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -16,7 +16,7 @@ eleventyNavigation:
|
|||
|
||||
<h2>Latest Changelogs</h2>
|
||||
{% for log in changelogs %}
|
||||
<h3 class="date-style">{{ log.date | formatDate }}</h3>
|
||||
<h3 class="date-style"><time datetime="{{ log.date }}">{{ log.date | formatDate }}</time></h3>
|
||||
{{ log.templateContent | safe }}
|
||||
{%- endfor %}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ eleventyNavigation:
|
|||
{%- endmacro -%}
|
||||
|
||||
<section class="content__section">
|
||||
<p>(This page was last updated on {{ updated | formatDate }})</p>
|
||||
<p>(This page was last updated on <time datetime="{{ updated }}">{{ updated | formatDate }}</time>)</p>
|
||||
</section>
|
||||
|
||||
{% include "main/virtualpets.njk" %}
|
||||
|
|
|
@ -12,7 +12,7 @@ Articles I have written.
|
|||
{%- for article in collections["my articles"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
|
|
@ -7,7 +7,7 @@ eleventyComputed:
|
|||
desc: What {{ sitemeta.siteAuthor.name }} is doing now.
|
||||
---
|
||||
|
||||
*This page was last updated on {{ updated | formatDate }}.*
|
||||
*This page was last updated on <time datetime="{{ updated }}">{{ updated | formatDate }}</time>.*
|
||||
|
||||
This is my [/now page](https://nownownow.com/about). You can find more pages like this at [nownownow.com](https://nownownow.com/).
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ eleventyNavigation:
|
|||
{%- for article in collections["cassette beasts articles"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
|
|
@ -17,7 +17,7 @@ eleventyNavigation:
|
|||
{%- for article in collections["kotor both articles"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
@ -27,7 +27,7 @@ eleventyNavigation:
|
|||
{%- for article in collections["kotor 1 articles"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
@ -37,7 +37,7 @@ eleventyNavigation:
|
|||
{%- for article in collections["kotor 2 articles"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
|
|
@ -17,7 +17,7 @@ eleventyNavigation:
|
|||
{%- for article in collections["kotor guides"] -%}
|
||||
<li>
|
||||
<p><a href="{{ article.url }}">{{ article.data.articleTitle }}</a></p>
|
||||
<p>{{ article.date | formatDate }}</p>
|
||||
<time datetime="{{ article.date }}">{{ article.date | formatDate }}</time>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue