feat: add reading time and icons
This commit is contained in:
parent
36641effb1
commit
2363157807
2 changed files with 13 additions and 2 deletions
|
@ -11,6 +11,11 @@
|
||||||
{%- for post in paginator.posts -%}
|
{%- for post in paginator.posts -%}
|
||||||
<li>
|
<li>
|
||||||
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
|
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
|
||||||
|
|
||||||
|
{% assign article = post.content %}
|
||||||
|
{%- include functions.html func='get_reading_time' -%}
|
||||||
|
{% assign reading_time = return %}
|
||||||
|
|
||||||
<h2 class="post-title">
|
<h2 class="post-title">
|
||||||
{%- assign post_url = post.url | relative_url -%}
|
{%- assign post_url = post.url | relative_url -%}
|
||||||
<a class="post-link" href="{{ post_url }}">
|
<a class="post-link" href="{{ post_url }}">
|
||||||
|
@ -18,7 +23,8 @@
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span class="post-date">{{ post.date | date: date_format }}</span>
|
<span class="post-date"><i class="fa fa-calendar"></i> {{ post.date | date: date_format }}</span>
|
||||||
|
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="post-excerpt">
|
<p class="post-excerpt">
|
||||||
{{ post.content | strip_html | truncatewords: 50 }}
|
{{ post.content | strip_html | truncatewords: 50 }}
|
||||||
|
|
|
@ -5,8 +5,13 @@
|
||||||
<p class="post-meta">
|
<p class="post-meta">
|
||||||
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
||||||
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
|
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
|
||||||
{{ page.date | date: date_format }}
|
<i class="fa fa-calendar"></i> {{ page.date | date: date_format }}
|
||||||
</time>
|
</time>
|
||||||
|
|
||||||
|
{% assign article = page.content %}
|
||||||
|
{%- include functions.html func='get_reading_time' -%}
|
||||||
|
{% assign reading_time = return %}
|
||||||
|
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{%- if page.tags.size > 0 -%}
|
{%- if page.tags.size > 0 -%}
|
||||||
|
|
Loading…
Reference in a new issue