Skip to main content

Plugin for Pelican that computes read time based on Medium's readtime "algorithm."

Project description

Plugin for Pelican that computes read time based on Medium’s readtime “algorithm”. It adds a readtime and readtime_minutes attributes to articles, with the time estimation for reading the article.

Usage

To use it you have to add the plugin name to the pelicanconf.py file.

PLUGINS=[ ... , 'readtime']

Then you can access the readtime variable to show read time estimation on your templates.

{% if article.readtime %} <div>{{ article.readtime }} read</div> {% endif %}

It will generate the following:

<div>X Minutes and Y Seconds read</div>

Alternatively, you can use the readtime_minutes variable to get the number of minutes instead of the fully formatted text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelican-readtime-0.1.2.zip (6.7 kB view details)

Uploaded Source

File details

Details for the file pelican-readtime-0.1.2.zip.

File metadata

  • Download URL: pelican-readtime-0.1.2.zip
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pelican-readtime-0.1.2.zip
Algorithm Hash digest
SHA256 c63a7481087d2dc60946491a1f0babd277b916c30f0888fb7a9afa7123e17675
MD5 27b08181bbd92ab6fc3d0c1c37a0fc59
BLAKE2b-256 3c3b9d1e905a8a9044c80003e91757319dcfd46610e4e6633b6b88ba115bce97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page