aboutsummaryrefslogtreecommitdiff
path: root/_includes/reading-time.html
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-02-14 02:38:59 +0300
committerValentin Popov <valentin@popov.link>2024-02-14 02:38:59 +0300
commite68f7cf6c7fadb1bceea955a4caf40954d9b024e (patch)
tree5fe6a1ac66ed98571674ab6686e1742a46812eb8 /_includes/reading-time.html
parentedaeaf08b8750e8278b18484ff8e0aa180fe3fab (diff)
downloadpopov.link-e68f7cf6c7fadb1bceea955a4caf40954d9b024e.tar.xz
popov.link-e68f7cf6c7fadb1bceea955a4caf40954d9b024e.zip
Moved actual template site
Diffstat (limited to '_includes/reading-time.html')
-rw-r--r--_includes/reading-time.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/_includes/reading-time.html b/_includes/reading-time.html
new file mode 100644
index 0000000..2515099
--- /dev/null
+++ b/_includes/reading-time.html
@@ -0,0 +1,7 @@
+{% capture words %}
+{{ content | number_of_words | minus: 180 }}
+{% endcapture %}
+
+{% unless words contains '-' %}
+{{ words | plus: 150 | divided_by: 150 | append: '&nbsp;min read' }}
+{% endunless %} \ No newline at end of file