Add reading time to archive layout and include icon
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<h2 class="archive__item-title" itemprop="headline">{% if post.id %}{{ post.title | markdownify | remove: "<p>" | remove: "</p>" }}{% else %}{{ post.title }}{% endif %}</h2>
|
||||
{% if site.read_time and post.read_time %}<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>{% endif %}
|
||||
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
|
||||
</article>
|
||||
</a>
|
||||
|
@ -1,4 +1,8 @@
|
||||
{% assign words = page.content | strip_html | number_of_words %}
|
||||
{% if post.read_time %}
|
||||
{% assign words = post.content | strip_html | number_of_words %}
|
||||
{% elsif page.read_time %}
|
||||
{% assign words = page.content | strip_html | number_of_words %}
|
||||
{% endif %}
|
||||
|
||||
{% if words < 180 %}
|
||||
{{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }}
|
||||
|
Reference in New Issue
Block a user