Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 2 additions & 39 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,11 @@ The following editors are currently supported:
- Textstring
- Textarea

> [!IMPORTANT]
> Version 15 will only receive security updates and no new features.
> [!WARNING]
> Version 15 is no longer supported and is End of Life (EOL).

> Please review the [security policy](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime?tab=security-ov-file#supported-versions) for more information.

## Quick Start

1. Install the [NuGet package](https://www.nuget.org/packages/jcdcdev.Umbraco.ReadingTime) in your Umbraco CMS website project.
```
dotnet add package jcdcdev.Umbraco.ReadingTime
```
2. Add the Reading Time data type to a document type. You can configure:
- `Words per minute` (default is 200)
- `Min Unit` (default is Minute)
- `Max Unit` (default is Minute)
3. Save and publish content.
4. Reading Time will display in the backoffice

### Using the value in your templates

In your template, you can accessing the Reading Time property value like any other property:

```html
@Model.ReadingTime.DisplayTime()
```

## Configuration

You can change the average words per minute in the data type settings.

When creating a new data type, the default will be 200 words per minute.

## Extending

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").

Min and max `TimeUnit` values are derived from the Data Type settings. The below example shows how you can ensure only seconds are displayed.

```csharp
Model.ReadingTime.DisplayTime(minUnit: TimeUnit.Second, maxUnit: TimeUnit.Second)
```

## Contributing

Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page.
Expand Down
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ The following table outlines the versions of the project that are currently supp
| Package Version | Umbraco Version | Security Phase Start | End of Life |
| ---------------------------------------------------------------------------------- | --------------- | -------------------- | ----------- |
| [13.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v13) | 13 | 2025-12-14 | 2026-12-14 |
| [15.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v15) | 15 | 2025-08-14 | 2025-11-14 |
| [16.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v16) | 16 | 2026-03-12 | 2026-06-12 |
| [16.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v16) | 16 | 2026-03-12 | 2026-06-12 |
| [17.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v17) | 17 | 2027-11-27 | 2028-11-27 |
## Unsupported Versions

| Package Version | Umbraco Version | End of Life |
| ---------------------------------------------------------------------------------- | --------------- | ----------- |
| [10.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v10) | 10 | 2025-06-16 |
| [12.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v12) | 12 | 2024-06-29 |
| [14.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v14) | 14 | 2025-05-30 |
| [15.x](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/tree/v15) | 15 | 2025-11-14 |


## Future Support
Expand Down