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. --- packages/reading-time/setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/reading-time/setup.py (limited to 'packages/reading-time/setup.py') diff --git a/packages/reading-time/setup.py b/packages/reading-time/setup.py new file mode 100644 index 0000000..b61d5cf --- /dev/null +++ b/packages/reading-time/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +setup( + name="lektor-reading-time", + version="0.1.0", + py_modules=["lektor_reading_time"], + entry_points={ + "lektor.plugins": [ + "reading-time = lektor_reading_time:ReadingTimePlugin", + ] + }, + install_requires=["nltk>=3.8"], +) -- cgit v1.3.1