From 3ccac9a70669db5cd9d83a1d05b02e0c43cf58c6 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 6 Nov 2026 08:04:54 +0100 Subject: Add reading time estimates to blog posts This adds a project-local Lektor plugin that estimates reading time from article text and images, using NLTK for word tokenization and decreasing time weights for successive images. The plugin exposes a `reading_time` template function and displays the estimated reading time alongside other blog post metadata. --- templates/macros/blog.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'templates') diff --git a/templates/macros/blog.html b/templates/macros/blog.html index 09e6a65..465e9d0 100644 --- a/templates/macros/blog.html +++ b/templates/macros/blog.html @@ -74,6 +74,12 @@ {% endif %} +
+
Reading time:
+
+ ~{{ reading_time(post) }} +
+
-- cgit v1.3.1