set reading speed from 300 to 200 wpm
This commit is contained in:
parent
3b524b9e0d
commit
7a4a132aff
@ -23,8 +23,8 @@ module.exports = function(eleventyConfig) {
|
|||||||
// To create a filter to determine duration of post
|
// To create a filter to determine duration of post
|
||||||
eleventyConfig.addFilter('readTime', (value) => {
|
eleventyConfig.addFilter('readTime', (value) => {
|
||||||
const content = value
|
const content = value
|
||||||
const textOnly = content.split(" ")//content.replace(/(<([^>]+)>)/gi, '')
|
const textOnly = content.split(" ") // content.replace(/(<([^>]+)>)/gi, '')
|
||||||
const readingSpeedPerMin = 300
|
const readingSpeedPerMin = 200
|
||||||
return Math.max(1, Math.floor(textOnly.length / readingSpeedPerMin))
|
return Math.max(1, Math.floor(textOnly.length / readingSpeedPerMin))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user