feat(list): Update the list of posts
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
0645f56405
commit
d53231853a
@ -1,36 +1,32 @@
|
|||||||
---
|
---
|
||||||
permalink: "index.html"
|
|
||||||
title: "Home"
|
|
||||||
layout: page
|
layout: page
|
||||||
|
permalink: "index.html"
|
||||||
|
title: "Список всех постов"
|
||||||
---
|
---
|
||||||
|
|
||||||
{% 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 %}
|
||||||
{% capture amount %}{{ amount | plus: 1 }}{% endcapture %}
|
<section>
|
||||||
|
<!-- Header -->
|
||||||
|
<h3>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | slugify }}</h3>
|
||||||
|
|
||||||
<h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | slugify }}</h2>
|
<ul>
|
||||||
|
|
||||||
<table itemtype="http://schema.org/BreadcrumbList" itemscope class="table table-striped">
|
|
||||||
{% for post in year.items %}
|
{% for post in year.items %}
|
||||||
<tr itemprop="itemListElement" itemtype="http://schema.org/ListItem" itemscope>
|
<li>
|
||||||
<!-- Position -->
|
<!-- Title / Link -->
|
||||||
<td itemprop="position" style="display: none;" hidden>{{ amount }}</td>
|
<a href="{{ post.url | relative_url | uri_escape }}">
|
||||||
|
{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}
|
||||||
<!-- Date -->
|
|
||||||
<td><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_long_string }}</time></td>
|
|
||||||
|
|
||||||
<!-- Title -->
|
|
||||||
<td>
|
|
||||||
<a itemprop="item" href="{{ post.url | relative_url | uri_escape }}">
|
|
||||||
<span itemprop="name">{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- Description -->
|
<small>
|
||||||
<td itemprop="description">{{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncatewords: 32 | xml_escape }}</td>
|
<!-- Date of publication -->
|
||||||
</tr>
|
<time datetime="{{ post.date | date_to_xmlschema }}">
|
||||||
|
<em>{{ post.date | date: '- %b %d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</em>
|
||||||
|
</time>
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</ul>
|
||||||
|
</section>
|
||||||
{% endfor %}
|
{% endfor %}
|
Loading…
x
Reference in New Issue
Block a user