Skip to content

v7.0

Compare
Choose a tag to compare
@linkdotnet linkdotnet released this 16 Dec 21:36
· 285 commits to master since this release
d23a6b6

Improvements

  • Reading time is moved when creating the blog post and not calculated on the fly
  • Refactoring the AppConfiguration into the IOptions pattern

Migration

SQL

For SQL databases the following script will create the new ReadingTimeInMinutes column and populate the values:

ALTER TABLE BlogPosts
ADD ReadingTimeInMinutes INT
GO

UPDATE BlogPosts
SET ReadingTimeInMinutes = CEILING(
    (LEN(Content) - LEN(REPLACE(Content, ' ', '')) + 1) / 250.0
    +
    (LEN(Content) - LEN(REPLACE(Content, '![', ''))) / 2.0
)

SELECT * FROM BlogPosts ORDER BY UpdatedDate DESC

Option migrations

Some changes to the appsettings.json have to be made:

{
	//other configuration
-	"AuthenticationProvider": "Auth0",
-	"Auth0": {
+       "Authentication": {
+         "Provider": "Auth0"

Also for AboutMeProfileInformation:

{
-    "AboutMeProfileInformation": {
+    "ProfileInformation": {