
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
gatsby-plugin-reading-time-2
Advanced tools
Artwork by Katerina Limpitsouni
A Gatsby plugin to estimate your markdown files reading time.
This plugin is sort of a fork from
gatsby-remark-reading-time
updated and with added configuration.
reading-time
).Mdx
and MarkdownRemark
.For Yarn users:
yarn add gatsby-plugin-reading-time-2
For Npm users:
npm install gatsby-plugin-reading-time-2
Mdx
Add gatsby-plugin-reading-time-2
as a plugin in gatsby-config.js
:
module.exports ={
plugins: [
// ...
`gatsby-plugin-reading-time-2`,
// ...
],
}
MarkdownRemark
Add gatsby-plugin-reading-time-2
as a MarkdownRemark
plugin in gatsby-config.js
:
module.exports ={
plugins: [
// ...
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
// ...
`gatsby-plugin-reading-time-2`,
//...
]
}
},
// ...
],
}
This plugin accepts 2 options following reading-time
options:
options.wordsPerMinute
: the words per minute an average reader can read (default: 200).options.wordBound
: a function that returns a boolean value depending on if a character is considered as a word bound (default: spaces, new lines and tabs).Resolve the plugin as follows to use them:
{
resolve: `gatsby-plugin-reading-time-2`,
options: {
wordsPerMinute: 200,
wordBound: function(c) { return ' \n\r\t'.includes(c) },
}
}
Any contribution to the project is welome.
Run into a problem? Open an issue.
Want to add some feature? PRs are welcome!
Copyright © 2021 Sacha Bouillez.
This project is under MIT license.
FAQs
📰 Gatsby plugin for reading-time integration
The npm package gatsby-plugin-reading-time-2 receives a total of 4 weekly downloads. As such, gatsby-plugin-reading-time-2 popularity was classified as not popular.
We found that gatsby-plugin-reading-time-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.