The list of posts forms micro-markup 'Schema.org'
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
3c44847bdb
commit
00213853bc
@ -4,31 +4,33 @@ title: "Home"
|
|||||||
layout: page
|
layout: page
|
||||||
---
|
---
|
||||||
|
|
||||||
|
{% assign amount = 0 %}
|
||||||
{% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
|
{% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
|
||||||
|
|
||||||
{% for year in postsByYear %}
|
{% for year in postsByYear %}
|
||||||
<h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | slugify }}</h2>
|
{% capture amount %}{{ amount | plus: 1 }}{% endcapture %}
|
||||||
|
|
||||||
<table class="table table-striped">
|
<h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | slugify }}</h2>
|
||||||
|
|
||||||
|
<table itemtype="http://schema.org/BreadcrumbList" itemscope class="table table-striped">
|
||||||
{% for post in year.items %}
|
{% for post in year.items %}
|
||||||
<tr>
|
<tr itemprop="itemListElement" itemtype="http://schema.org/ListItem" itemscope>
|
||||||
|
<!-- Position -->
|
||||||
|
<td itemprop="position" style="display: none;" hidden>{{ amount }}</td>
|
||||||
|
|
||||||
<!-- Date -->
|
<!-- Date -->
|
||||||
<td>
|
<td><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_long_string }}</time></td>
|
||||||
<time datetime="{{ post.date | date_to_xmlschema}}">{{ post.date | date_to_long_string }}</time>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ post.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}">
|
<a itemprop="item" href="{{ post.url | relative_url | uri_escape }}">
|
||||||
{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}
|
<span itemprop="name">{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<td>
|
<td itemprop="description">{{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncatewords: 32 | xml_escape }}</td>
|
||||||
{{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncatewords: 32 | xml_escape }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% endfor %}
|
{% endfor %}
|
Loading…
Reference in New Issue
Block a user