✨ feat(meta): allow hiding the read time indication on pages (#124)
Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
parent
0c87f6513b
commit
b58225a012
@ -185,6 +185,10 @@ stylesheets = []
|
|||||||
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
||||||
copy_button = true
|
copy_button = true
|
||||||
|
|
||||||
|
# Show the reading time of a page.
|
||||||
|
# Can also be enabled or disabled on individual pages in the front matter's [extra].
|
||||||
|
show_reading_time = true
|
||||||
|
|
||||||
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
|
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
|
||||||
footnote_backlinks = false
|
footnote_backlinks = false
|
||||||
|
|
||||||
|
@ -22,10 +22,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.date %}
|
{% if page.date %}
|
||||||
<li>{{ macros_format_date::format_date(date=page.date, short=true) }} {{ separator }}</li>
|
<li>{{ macros_format_date::format_date(date=page.date, short=true) }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li title="{{ page.word_count }} {%- if lang != config.default_language %} {{ trans(key="words" | safe, lang=lang) }} {% else %} words {% endif %}"> {{ page.reading_time }}{%- if lang != config.default_language %} {{ trans(key="min_read" | safe, lang=lang) }} {% else %} min read {% endif %}</li>
|
{# page settings override config settings #}
|
||||||
|
{% if page.extra.show_reading_time | default(value="") == true or page.extra.show_reading_time | default(value="") != false and config.extra.show_reading_time | default(value=true) %}
|
||||||
|
{{ separator }} <li title="{{ page.word_count }} {%- if lang != config.default_language %} {{ trans(key="words" | safe, lang=lang) }} {% else %} words {% endif %}">{{ page.reading_time }}{%- if lang != config.default_language %} {{ trans(key="min_read" | safe, lang=lang) }} {% else %} min read {% endif %}</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if page.taxonomies and page.taxonomies.tags %}
|
{% if page.taxonomies and page.taxonomies.tags %}
|
||||||
<li> {{ separator }} {%- if lang != config.default_language -%}{{ trans(key="tags" | safe, lang=lang) | capitalize }}{% else %}Tags{%- endif -%}: </li>
|
<li> {{ separator }} {%- if lang != config.default_language -%}{{ trans(key="tags" | safe, lang=lang) | capitalize }}{% else %}Tags{%- endif -%}: </li>
|
||||||
|
@ -70,6 +70,10 @@ stylesheets = []
|
|||||||
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
|
||||||
copy_button = true
|
copy_button = true
|
||||||
|
|
||||||
|
# Show the reading time of a page.
|
||||||
|
# Can also be enabled or disabled on individual pages in the front matter's [extra].
|
||||||
|
show_reading_time = true
|
||||||
|
|
||||||
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
|
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
|
||||||
footnote_backlinks = false
|
footnote_backlinks = false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user