Reading Time Screenshot

Contentful Reading Time Field App

This simple Contentful App offers the capability to calculate and store a reading time value along with an entry, making it especially useful for blog post articles.

The calculation is derived from a single entry field, whether it’s Rich Text or Long Text. It takes into consideration the number of words, assets, and embedded entries, providing an efficient way to estimate reading time for your content.

bash
1
2
3
4
5
wordsPerMinute = 225 (avg of most people)
assetsPerSecond = 10
entriesPerSecond = 10

Reading Time (min) = (totalWords * wordsPerMinute) + (totalAssets * assetsPerSecond / 60) + (totalEmbeddedEntries * entriesPerSecond / 60)

The resulting calculation is stored in the entry in a JSON field like the following example:

json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
    "readingTime":
    {
        "en-US":
        {
            "text": "3 min read",
            "time": 178133,
            "words": 668,
            "assets": 7,
            "entries": 1,
            "minutes": 4.3
        }
    }
}

Demo

Screencast of the App in action

Keep in mind that the accuracy of this formula might vary, particularly due the types of the embedded entries you have. However, you have the flexibility to tweak the values in the configuration, and manually override the calculated reading time within the entry.

Download and installation instructions on GitHub https://github.com/pauloamgomes/contentful-readingtime-field-app