Merge pull request #15218 from crazy-max/p-read-time

jekyll: keep paragraph of reading time and use include
This commit is contained in:
CrazyMax 2022-07-27 13:35:23 +02:00 committed by GitHub
commit 43fdab2019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,6 @@
{%- unless page.skip_read_time == true -%}
{%- assign words = content | number_of_words -%}
{%- if words >= 360 -%}
<p><em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em></p>
<em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em>
{%- endif -%}
{%- endunless -%}

View File

@ -28,12 +28,7 @@
{%- if page.advisory -%}
<blockquote>{{ site.data.advisories.texts[page.advisory] | markdownify }}</blockquote>
{%- endif -%}
{%- unless page.skip_read_time == true -%}
{%- assign words = content | number_of_words -%}
{%- if words >= 360 -%}
<p><em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em></p>
{%- endif -%}
{%- endunless -%}
<p>{%- include read_time.html -%}</p>
{{ content }}
{%- unless page.notags == true -%}
{%- assign keywords = page.keywords | split:"," -%}