Skip to content

Commit c17d205

Browse files
authored
Merge pull request #178 from jcdcdev/dev/v17
17.0.3
2 parents e4e831e + e9abff0 commit c17d205

File tree

2 files changed

+17
-59
lines changed

2 files changed

+17
-59
lines changed

.github/README.md

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# jcdcdev.Umbraco.ReadingTime
1+
# Reading Time
22

3+
[![Documentation](https://img.shields.io/badge/Documentation-123?color=394933&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjb2xvcj0id2hpdGUiIGNsYXNzPSJiaSBiaS1ib29rIiB2aWV3Qm94PSIwIDAgMTYgMTYiPgogIDxwYXRoIGQ9Ik0xIDIuODI4Yy44ODUtLjM3IDIuMTU0LS43NjkgMy4zODgtLjg5MyAxLjMzLS4xMzQgMi40NTguMDYzIDMuMTEyLjc1MnY5Ljc0NmMtLjkzNS0uNTMtMi4xMi0uNjAzLTMuMjEzLS40OTMtMS4xOC4xMi0yLjM3LjQ2MS0zLjI4Ny44MTF6bTcuNS0uMTQxYy42NTQtLjY4OSAxLjc4Mi0uODg2IDMuMTEyLS43NTIgMS4yMzQuMTI0IDIuNTAzLjUyMyAzLjM4OC44OTN2OS45MjNjLS45MTgtLjM1LTIuMTA3LS42OTItMy4yODctLjgxLTEuMDk0LS4xMTEtMi4yNzgtLjAzOS0zLjIxMy40OTJ6TTggMS43ODNDNy4wMTUuOTM2IDUuNTg3LjgxIDQuMjg3Ljk0Yy0xLjUxNC4xNTMtMy4wNDIuNjcyLTMuOTk0IDEuMTA1QS41LjUgMCAwIDAgMCAyLjV2MTFhLjUuNSAwIDAgMCAuNzA3LjQ1NWMuODgyLS40IDIuMzAzLS44ODEgMy42OC0xLjAyIDEuNDA5LS4xNDIgMi41OS4wODcgMy4yMjMuODc3YS41LjUgMCAwIDAgLjc4IDBjLjYzMy0uNzkgMS44MTQtMS4wMTkgMy4yMjItLjg3NyAxLjM3OC4xMzkgMi44LjYyIDMuNjgxIDEuMDJBLjUuNSAwIDAgMCAxNiAxMy41di0xMWEuNS41IDAgMCAwLS4yOTMtLjQ1NWMtLjk1Mi0uNDMzLTIuNDgtLjk1Mi0zLjk5NC0xLjEwNUMxMC40MTMuODA5IDguOTg1LjkzNiA4IDEuNzgzIi8+Cjwvc3ZnPg==)](https://docs.jcdc.dev/jcdcdev-umbraco-readingtime/latest)
34
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco%20Marketplace-%23f5c1bc?logo=umbraco&logoColor=162335)](https://marketplace.umbraco.com/package/jcdcdev.Umbraco.ReadingTime)
45
[![GitHub](https://img.shields.io/badge/GitHub-1?logo=github&color=232925)](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime)
56
[![NuGet Downloads](https://img.shields.io/nuget/dt/jcdcdev.Umbraco.ReadingTime?labelColor=4536d3&color=4536d3&label=NuGet&logo=nuget)](https://www.nuget.org/packages/jcdcdev.Umbraco.ReadingTime)
@@ -26,45 +27,27 @@ The following editors are currently supported:
2627
dotnet add package jcdcdev.Umbraco.ReadingTime
2728
```
2829

29-
## Quick Start
30-
31-
1. Install the NuGet package
32-
2. Add the Reading Time data type to a document type. You can configure:
33-
- `Words per minute` (default is 200)
34-
- `Min Unit` (default is Minute)
35-
- `Max Unit` (default is Minute)
36-
3. Save and publish content.
37-
4. Reading Time will display in the backoffice
38-
39-
### Using the value in your templates
40-
41-
In your template, you can accessing the Reading Time property value like any other property:
42-
43-
```html
44-
@Model.ReadingTime.DisplayTime()
45-
```
46-
4730
## Configuration
4831

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

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

53-
## Extending
36+
## Security
5437

55-
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").
38+
> [!NOTE]
39+
> This project takes security and support seriously.
40+
> Please visit the [Security](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime?tab=security-ov-file) page for more information.
41+
5642

57-
Min and max `TimeUnit` values are derived from the Data Type settings. The below example shows how you can ensure only seconds are displayed.
58-
59-
```csharp
60-
Model.ReadingTime.DisplayTime(minUnit: TimeUnit.Second, maxUnit: TimeUnit.Second)
61-
```
6243

6344
## Contributing
6445

6546
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page.
6647

67-
## Acknowledgements (Thanks)
48+
## Acknowledgements
49+
50+
Thank you to the following projects and individuals for their contributions. High five, you rock! 🤘🦄
6851

6952
- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter)
7053

docs/README_nuget.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# jcdcdev.Umbraco.ReadingTime
1+
# Reading Time
22

33
[![Documentation](https://img.shields.io/badge/Documentation-123?color=394933&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjb2xvcj0id2hpdGUiIGNsYXNzPSJiaSBiaS1ib29rIiB2aWV3Qm94PSIwIDAgMTYgMTYiPgogIDxwYXRoIGQ9Ik0xIDIuODI4Yy44ODUtLjM3IDIuMTU0LS43NjkgMy4zODgtLjg5MyAxLjMzLS4xMzQgMi40NTguMDYzIDMuMTEyLjc1MnY5Ljc0NmMtLjkzNS0uNTMtMi4xMi0uNjAzLTMuMjEzLS40OTMtMS4xOC4xMi0yLjM3LjQ2MS0zLjI4Ny44MTF6bTcuNS0uMTQxYy42NTQtLjY4OSAxLjc4Mi0uODg2IDMuMTEyLS43NTIgMS4yMzQuMTI0IDIuNTAzLjUyMyAzLjM4OC44OTN2OS45MjNjLS45MTgtLjM1LTIuMTA3LS42OTItMy4yODctLjgxLTEuMDk0LS4xMTEtMi4yNzgtLjAzOS0zLjIxMy40OTJ6TTggMS43ODNDNy4wMTUuOTM2IDUuNTg3LjgxIDQuMjg3Ljk0Yy0xLjUxNC4xNTMtMy4wNDIuNjcyLTMuOTk0IDEuMTA1QS41LjUgMCAwIDAgMCAyLjV2MTFhLjUuNSAwIDAgMCAuNzA3LjQ1NWMuODgyLS40IDIuMzAzLS44ODEgMy42OC0xLjAyIDEuNDA5LS4xNDIgMi41OS4wODcgMy4yMjMuODc3YS41LjUgMCAwIDAgLjc4IDBjLjYzMy0uNzkgMS44MTQtMS4wMTkgMy4yMjItLjg3NyAxLjM3OC4xMzkgMi44LjYyIDMuNjgxIDEuMDJBLjUuNSAwIDAgMCAxNiAxMy41di0xMWEuNS41IDAgMCAwLS4yOTMtLjQ1NWMtLjk1Mi0uNDMzLTIuNDgtLjk1Mi0zLjk5NC0xLjEwNUMxMC40MTMuODA5IDguOTg1LjkzNiA4IDEuNzgzIi8+Cjwvc3ZnPg==)](https://docs.jcdc.dev/jcdcdev-umbraco-readingtime/latest)
44
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco%20Marketplace-%23f5c1bc?logo=umbraco&logoColor=162335)](https://marketplace.umbraco.com/package/jcdcdev.Umbraco.ReadingTime)
@@ -19,43 +19,18 @@ The following editors are currently supported:
1919
- Textstring
2020
- Textarea
2121

22-
## Installation
22+
## Security
2323

24-
### Install Package
25-
26-
```csharp
27-
dotnet add package jcdcdev.Umbraco.ReadingTime
28-
```
29-
30-
## Quick Start
31-
32-
1. Install the NuGet package
33-
2. Add the Reading Time data type to a document type. You can configure:
34-
- `Words per minute` (default is 200)
35-
- `Min Unit` (default is Minute)
36-
- `Max Unit` (default is Minute)
37-
3. Save and publish content.
38-
4. Reading Time will display in the backoffice
39-
40-
### Using the value in your templates
41-
42-
In your template, you can accessing the Reading Time property value like any other property:
43-
44-
```html
45-
@Model.ReadingTime.DisplayTime()
46-
```
47-
48-
## Configuration
49-
50-
You can change the average words per minute in the data type settings.
51-
52-
When creating a new data type, the default will be 200 words per minute.
24+
This project takes security and support seriously.
25+
Please visit the [Security](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime?tab=security-ov-file) page for more information.
5326

5427
## Contributing
5528

5629
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/jcdcdev.Umbraco.ReadingTime/contribute) page.
5730

58-
## Acknowledgements (Thanks)
31+
## Acknowledgements
32+
33+
Thank you to the following projects and individuals for their contributions. High five, you rock! 🤘🦄
5934

6035
- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter)
6136

0 commit comments

Comments
 (0)