linkdotnet / Blog

A blog (engine) completely written in C# and Blazor. It aims to be a simple use and easy to extend platform. Blogposts are written in Markdown and are rendered to HTML. This gives all the flexibility needed to express yourself but also have an easy way of creating posts in the first place.
https://steven-giesel.com/
MIT License
287 stars 51 forks source link

Calculate reading time when creating/updating blog post #262

Closed linkdotnet closed 9 months ago

linkdotnet commented 1 year ago

Current Situtation

The reading time will be calculated if the blog post is shown inside the ShortBlogPost and will be held inside a cache for an hour before re-evaluating. The reason was to be backward compatible without adding a new column to the BlogPost entity.

Target Situation

The reading time should be done once (inside BlogPost.Create method) for updating and creating blog posts. Ideally, a migration script should be provided to make it easier to make the column NOT NULL.