From 863b227043d2ad8ac5a4f60377367712d793d54b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 27 Jul 2022 13:02:45 +0200 Subject: [PATCH] jekyll: keep paragraph of reading time and use include Signed-off-by: CrazyMax --- _includes/read_time.html | 4 +++- _layouts/docs.html | 7 +------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/_includes/read_time.html b/_includes/read_time.html index 9cb3f7ae19..b6eb2e9be2 100644 --- a/_includes/read_time.html +++ b/_includes/read_time.html @@ -1,4 +1,6 @@ +{%- unless page.skip_read_time == true -%} {%- assign words = content | number_of_words -%} {%- if words >= 360 -%} -

Estimated reading time: {{ words | divided_by:180 }} minutes

+Estimated reading time: {{ words | divided_by:180 }} minutes {%- endif -%} +{%- endunless -%} diff --git a/_layouts/docs.html b/_layouts/docs.html index 17bc31b751..72d909136c 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -28,12 +28,7 @@ {%- if page.advisory -%}
{{ site.data.advisories.texts[page.advisory] | markdownify }}
{%- endif -%} - {%- unless page.skip_read_time == true -%} - {%- assign words = content | number_of_words -%} - {%- if words >= 360 -%} -

Estimated reading time: {{ words | divided_by:180 }} minutes

- {%- endif -%} - {%- endunless -%} +

{%- include read_time.html -%}

{{ content }} {%- unless page.notags == true -%} {%- assign keywords = page.keywords | split:"," -%}