Statiq - Plugins - Reading Time

Building Statiq plugins
Published on Monday, 30 December 2024

https://www.statiq.dev/web

I've been keeping a list of Statiq Community extensions and uses on the main Discussions list:

I was reviewing some blog posts and found a few from Jeremy Davis, see Statiq 🏷 tag.

To make this easier to add into my own blog I decided to make a new project: Statiq.Plugins and port the features there.

Adding reading time estimates to blog posts from @ Jeremy Davis

In your appsettings.json add a new property ReadingSpeed and set it to your desired value:

"ReadingSpeed": 200

You can then override the input/_header.cshtml of your theme and place the calculated time after the tags.

<span>~@Model.GetString("ReadingTime") minutes</span>

Example

You can see an example on my test site: https://alexhedley.com/statiqweb-example/posts/1

Reading Time

or

Reading Time

In the future I'm looking to add more functionality. I've raised a number of Issues to track them. If you have any ideas please add your own.

Code

Statiq.Plugins Icon

NuGet Version NuGet Downloads

dotnet add package Statiq.Plugins --version #.#.#