Skip to content

Commit 6fa27ea

Browse files
author
Josh Habdas
authored
Use datetime for time element
Currently metadata items are outputting a `time` element with a `datetime` attribute which is ISO 8601 compliant, but does not include information about time of day and timezone offset. This updates the output so it outputs all available information. Before: ```html <time class="icon-calendar pr20" datetime="2016-12-03" itemprop="datePublished">2016-12-03</time> ``` After ```html <time class="icon-calendar pr20" datetime="2016-12-03T08:00:00+08:00" itemprop="datePublished"> 2016-12-03</time> ``` References: http://devdocs.io/html/element/time for general info https://www.w3.org/TR/html51/infrastructure.html#dates-and-times for information about http://jekyll.tips/jekyll-cheat-sheet/ for liquid filter info
1 parent 57f4a4a commit 6fa27ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/_meta_information.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% endif %}
1010

1111
{% if page.date %}
12-
<time class="icon-calendar pr20" datetime="{{ page.date | date: "%Y-%m-%d" }}" itemprop="datePublished"> {{ page.date | date: "%Y-%m-%d" }}</time>
12+
<time class="icon-calendar pr20" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished"> {{ page.date | date: "%Y-%m-%d" }}</time>
1313
{% endif %}
1414

1515
{% if page.categories %}<span class="icon-archive pr20"> {{ page.categories | join: ' · ' | upcase }}{% endif %}</span>
@@ -28,4 +28,4 @@
2828
<div class="small-5 columns text-right"></div><!-- /.small-4.columns -->
2929
{% endif %}
3030
</div>
31-
</div><!-- /.page-meta -->
31+
</div><!-- /.page-meta -->

0 commit comments

Comments
 (0)