Sha256: 318aa32f7adc6e5dddff71019b2f847bc2c3490bc0eeee4f73a0a9f47cf5eba2

Contents?: true

Size: 903 Bytes

Versions: 7

Compression:

Stored size: 903 Bytes

Contents

<!--
  Calculate the post's reading time, and display the word count in tooltip
 -->

{% assign words = include.content | strip_html | number_of_words: "auto" %}

<!-- words per minute  -->

{% assign wpm = 180 %}
{% assign min_time = 1 %}

{% assign read_time = words | divided_by: wpm %}

{% unless read_time > 0 %}
  {% assign read_time = min_time %}
{% endunless %}

{% capture read_prompt %}
  {{- site.data.locales[lang].post.read_time.prompt -}}
{% endcapture %}

<!-- return element -->
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
  title="{{ words }} {{ site.data.locales[lang].post.words }}">
  {{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}
  {%- if include.prompt -%}
    {% assign _prompt_words = read_prompt | number_of_words: 'auto' %}
    {% unless _prompt_words > 1 %}{{" "}}{% endunless %}{{ read_prompt }}
  {%- endif -%}
</span>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jekyll-theme-chirpy-4.3.4 _includes/read-time.html
jekyll-theme-chirpy-4.3.3 _includes/read-time.html
jekyll-theme-chirpy-4.3.2 _includes/read-time.html
jekyll-theme-chirpy-4.3.1 _includes/read-time.html
jekyll-theme-chirpy-4.3.0 _includes/read-time.html
jekyll-theme-chirpy-4.2.1 _includes/read-time.html
jekyll-theme-chirpy-4.2.0 _includes/read-time.html