Skip to content
This repository was archived by the owner on Feb 27, 2022. It is now read-only.

Conversation

bketelsen
Copy link

Adds 'reading-time', propagating reading_time and word_count in frontMatter.
Adds test for reading_time and word_count.

@bketelsen
Copy link
Author

@arshad are there any changes you want me to make to this PR?

@shadcn
Copy link
Owner

shadcn commented Mar 25, 2021

Sorry. I forgot to review this. I added a few comments on the issue: #3 (comment)


const word_count = content.split(/\s+/gu).length
const reading_time = readingTime(content)
frontMatter.reading_time = reading_time
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants