BlakePlugin.ReadTime 1.0.1

dotnet add package BlakePlugin.ReadTime --version 1.0.1
                    
NuGet\Install-Package BlakePlugin.ReadTime -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlakePlugin.ReadTime" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlakePlugin.ReadTime" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="BlakePlugin.ReadTime" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlakePlugin.ReadTime --version 1.0.1
                    
#r "nuget: BlakePlugin.ReadTime, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlakePlugin.ReadTime@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlakePlugin.ReadTime&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=BlakePlugin.ReadTime&version=1.0.1
                    
Install as a Cake Tool

BlakePlugin.ReadTime

A Blake plugin that calculates estimated reading time for content based on 200 words per minute reading speed.

Features

  • Automatically calculates reading time for all markdown pages
  • Uses industry standard 200 words per minute reading speed
  • Adds reading time to page metadata as readTimeMinutes
  • Works seamlessly with Blake's build process

Installation

Install the NuGet package:

dotnet add package BlakePlugin.ReadTime

Usage

Blake automatically discovers plugins added to your project, and runs them during the build process. Once added to your project, just bake your site as usual, and the plugin will process all markdown pages to calculate reading time.

blake bake

Specify your own words per minutes:

blake bake --readtine:wpm=500

The plugin will automatically process all markdown pages during the build and add a readTimeMinutes metadata property to each page.

Accessing Reading Time

Each page's estimated reading time can be accessed from the page's metadata. This is accessible via the global generated content index.

// Example in a Razor template
var readingTime = GeneratedContentIndex.GetPages().FirstOrDefault(p => p.Slug == "your-page-slug")?.Metadata["readTimeMinutes"];

How It Works

The plugin:

  1. Runs after the bake process (AfterBakeAsync)
  2. Counts words in each markdown page using regex pattern \b\w+\b
  3. Calculates reading time using 200 words per minute by default (approximate adult reading average)
  4. Uses user-supplied WPM via CLI arguments, if present
  5. Rounds up to the nearest minute
  6. Adds the result to the page metadata

License

This project is licensed under MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 146 8/22/2025
1.0.0 271 8/5/2025