You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom Data Type for calculating reading time. With full variant support!
10
10
11
11
The following editors are currently supported:
@@ -16,10 +16,10 @@ The following editors are currently supported:
16
16
- Block List
17
17
- Nested Content
18
18
- Textstring
19
-
- Textarea
20
-
21
-
## Quick Start
22
-
19
+
- Textarea
20
+
21
+
## Quick Start
22
+
23
23
1. Install the [NuGet package](https://www.nuget.org/packages/jcdcdev.Umbraco.ReadingTime) in your Umbraco CMS website project.
24
24
```
25
25
dotnet add package jcdcdev.Umbraco.ReadingTime
@@ -37,31 +37,31 @@ In your template, you can accessing the Reading Time property value like any oth
37
37
38
38
```html
39
39
@Model.ReadingTime.DisplayTime()
40
-
```
41
-
42
-
## Configuration
43
-
40
+
```
41
+
42
+
## Configuration
43
+
44
44
You can change the average words per minute in the data type settings.
45
45
46
-
When creating a new data type, the default will be 200 words per minute.
47
-
48
-
## Extending
49
-
46
+
When creating a new data type, the default will be 200 words per minute.
47
+
48
+
## Extending
49
+
50
50
The `DisplayTime` method will format the reading time as a string using [Humanizer](https://github.com/Humanizr/Humanizer). This supports variants, meaning the reading time will be displayed based on the pluralisation rules of the current culture (e.g. "1 minute", "2 minutes", "0 minuter").
51
51
52
52
Min and max `TimeUnit` values are derived from the Data Type settings. The below example shows how you can ensure only seconds are displayed.
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page.
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page.
0 commit comments