Skip to content

Commit f1314bb

Browse files
authored
Merge pull request #1681 from scarf005/feat/use-time-tag
feat: use `<time>` tag
2 parents 2303552 + fbfcbc5 commit f1314bb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

_includes/blog-list.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
{% for post in paginator.posts %}
1717
<div class="blog-item">
1818
<h2><a href="{{post.url}}">{{post.title}}</a></h2>
19-
<p class="blog-date">{{post.date | date: "%A %-d %B %Y"}}</p>
19+
<time datetime="{{post.date}}" class="blog-date">{{post.date | date: "%A %-d %B %Y"}}</time>
2020
{% if post.by %}<p class="blog-author">{{post.by}}</p>{% endif %}
2121
{% if post.tags %}
2222
<ul class="tag-list">
2323
{% for tag in post.tags %}
2424
<li class="tag-item">{{tag}}</li>
25-
{% endfor %}
25+
{% endfor %}
2626
</ul>
2727
{% endif %}
2828
</div>
@@ -37,7 +37,7 @@ <h2><a href="{{post.url}}">{{post.title}}</a></h2>
3737

3838
{% capture urlPath %}{% if include.category == "all" %}blog{% else %}{{currentCategoryPath}}{% endif %}{% endcapture %}
3939
{% assign urlPath = urlPath | split: '/' | join: '/' | remove_first: '/' %}
40-
{% include paginator.html urlPath=urlPath %}
40+
{% include paginator.html urlPath=urlPath %}
4141
</div>
4242
{% assign highlights = "" | split: "," %}
4343
{% for post in site.posts %}
@@ -51,7 +51,7 @@ <h2><a href="{{post.url}}">{{post.title}}</a></h2>
5151
<div class="content-nav-blog">
5252
<div class="inner-box">
5353
<h5>Highlights</h5>
54-
<div class="blog-list-nav">
54+
<div class="blog-list-nav">
5555
{% endif %}
5656
<div class="blog-list-nav-item">
5757
<h4><a href="{{post.url}}">{{post.title}}</a></h4>
@@ -70,6 +70,6 @@ <h4><a href="{{post.url}}">{{post.title}}</a></h4>
7070
</div>
7171
{% endif %}
7272
{% endfor %}
73-
73+
7474
</div>
75-
</section>
75+
</section>

_includes/inner-page-blog-detail-main-content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="inner-box">
55
<div class="blog-detail-head">
66
<div>
7-
<p>{{page.date | date: "%A %-d %B %Y"}}</p>
7+
<time datetime="{{page.date}}">{{page.date | date: "%A %-d %B %Y"}}</time>
88
<p>{{page.by}}</p>
99
</div>
1010
{% if page.tags %}

_layouts/blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
---
44

55
<div class="main-page-column">
6-
<div class="article-date">{{ page.date | date: "%B %-d, %Y" }}</div>
6+
<time datetime="{{page.date}}" class="article-date">{{ page.date | date: "%B %-d, %Y" }}</time>
77
{% if page.by %}
88
<div class="written">Written By: <span class="by">{{ page.by }}</span></div>
99
{% endif %}

0 commit comments

Comments
 (0)