Sha256: bc7f0a8994e8121efa9999f561fd42b352a3a4d016098b2e7cb51b9ec16cef4a

Contents?: true

Size: 935 Bytes

Versions: 12

Compression:

Stored size: 935 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[site.lang].post.read_time.prompt -}}
{% endcapture %}

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

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
jekyll-theme-chirpy-5.6.1 _includes/read-time.html
jekyll-theme-chirpy-5.6.0 _includes/read-time.html
custom-chirpy-5.5.2 _includes/read-time.html
jekyll-theme-chirpy-5.5.2 _includes/read-time.html
jekyll-theme-chirpy-5.5.1 _includes/read-time.html
jekyll-theme-chirpy-5.5.0 _includes/read-time.html
jekyll-theme-chirpy-customized-by-alazaroc-5.4.0 _includes/read-time.html
dev-jekyll-theme-1.0.0 _includes/read-time.html
jekyll-theme-chirpy-5.4.0 _includes/read-time.html
jekyll-theme-chirpy-5.3.2 _includes/read-time.html
jekyll-theme-chirpy-5.3.1 _includes/read-time.html
jekyll-theme-chirpy-clarkezone-5.3.2 _includes/read-time.html