Added support for Reading time plugin

This commit is contained in:
pmoreno 2023-04-17 20:32:42 +02:00
parent 296a9a51c5
commit 7cbb06561f

5
templates/partials/blog_item.html.twig Normal file → Executable file
View file

@ -42,6 +42,11 @@
{% endif %}
</div>
<div class="meta">
{# Support for reading time plugin #}
{% if config.plugins.readingtime.enabled %}
<span class="reading-time"><i class="fas fa-book-reader"></i> {{ page.content|readingtime}}</span>
{% endif %}
{# Support for translate and twig extensions plugins #}
{% if config.plugins["translate-date"].enabled %}
<time class="published" itemprop="datePublished" datetime="{{ page.date|td(null, "Y-m-d") }}">{{ page.date|td(null, "M j, Y") }}</time>
{% elseif config.plugins["twig-extensions"].enabled %}