mirror of
https://github.com/welpo/tabi.git
synced 2026-06-13 06:47:35 +02:00
diff --git a/config.toml b/config.toml
index d1885fe..9fe31bf 100644
--- a/config.toml
+++ b/config.toml
@@ -185,6 +185,9 @@ stylesheets = []
# Add a "copy" button to codeblocks (loads ~700 bytes of JavaScript).
copy_button = true
+# Show the reading time of a page.
+show_reading_time = true
+
# Adds backlinks to footnotes (loads ~500 bytes of JavaScripts).
footnote_backlinks = false
diff --git a/templates/macros/content.html b/templates/macros/content.html
index 4c42835..b7bb86d 100644
--- a/templates/macros/content.html
+++ b/templates/macros/content.html
@@ -17,7 +17,9 @@
<li>{{ macros_format_date::format_date(date=page.date, short=true) }} {{ separator }}</li>
{% 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>
+ {% if page.extra.show_reading_time %}
+ <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 %}
<li> {{ separator }} {%- if lang != config.default_language -%}{{ trans(key="tags" | safe, lang=lang) | capitalize }}{% else %}Tags{%- endif -%}: </li>
|
||
|---|---|---|
| .. | ||
| macros | ||
| partials | ||
| shortcodes | ||
| tags | ||
| 404.html | ||
| anchor-link.html | ||
| archive.html | ||
| atom.xml | ||
| base.html | ||
| cards.html | ||
| index.html | ||
| page.html | ||
| section.html | ||