Reading Time

Custom Data Type for calculating reading time.

Docs Quickstart Umbraco Marketplace License NuGet Downloads

Features

Reading Time

See how long your content will take to read

Configurable

Configure average words per minute via the Back Office or appsettings.json

Extensible

Using a custom editor?

Add your own IReadingTimeValueProvider to calculate reading time.

Versions

Umbraco icon
Umbraco CMS 10

10.0.4

Version 10 Support Policy

Feature updates ended 16/06/2024
Security updates until 16/06/2025
Umbraco icon
Umbraco CMS 13

13.0.4

Version 13 Support Policy

Feature updates until 14/12/2025
Security updates until 14/12/2026
Umbraco icon
Umbraco CMS 14

14.0.5

Version 14 Support Policy

Feature updates ended 02/03/2025
Security updates until 30/05/2025
Umbraco icon
Umbraco CMS 15

15.0.9

Version 15 Support Policy

Feature updates until 14/08/2025
Security updates until 14/11/2025

Readme

Quick Start

  1. Install the NuGet package in your Umbraco CMS website project.
dotnet add package jcdcdev.Umbraco.ReadingTime
  1. Add the Reading Time data type to a document type. You can configure:
  • Words per minute (default is 200)
  • Min Unit (default is Minute)
  • Max Unit (default is Minute)
  1. Save and publish content.
  2. Reading Time will display in the backoffice

Using the value in your templates

In your template, you can accessing the Reading Time property value like any other property:

@Model.ReadingTime.DisplayTime()

Configuration

You can change the average words per minute in the data type settings.

When creating a new data type, the default will be 200 words per minute.

Extending

The DisplayTime method will format the reading time as a string using Humanizer. This supports variants, meaning the reading time will be displayed based on the pluralisation rules of the current culture (e.g. “1 minute”, “2 minutes”, “0 minuter”).

Min and max TimeUnit values are derived from the Data Type settings. The below example shows how you can ensure only seconds are displayed.

Model.ReadingTime.DisplayTime(minUnit: TimeUnit.Second, maxUnit: TimeUnit.Second)

Contributing

Contributions to this package are most welcome! Please visit the Contributing page.

Acknowledgements (Thanks)