Skip to content

Commit

Permalink
Merge pull request #88 from greenpeace/develop
Browse files Browse the repository at this point in the history
feat: add reading time
  • Loading branch information
tkhg authored Jan 16, 2023
2 parents 159bf11 + 68f45c3 commit 1313069
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/single.twig
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
</address>
{% endif %}
<time class="single-post-time" pubdate>{{ post.post_date|date }}</time>
{% set reading_time = post.reading_time %}
{% if reading_time %}
<span class="single-post-meta-bullet" aria-hidden="true">&#8226;</span>
<span class="single-post-meta-readtime">
{{ __( '%d min read', 'planet4-master-theme' )|format(reading_time) }}
</span>
{% endif %}
{% if ( show_comments ) %}
<span class="single-post-meta-bullet" aria-hidden="true">&#8226;</span>
<a href="#comments" class="comment-link">
Expand Down

0 comments on commit 1313069

Please sign in to comment.