set reading speed from 300 to 200 wpm

This commit is contained in:
eggy 2021-04-16 22:39:21 -04:00
parent 3b524b9e0d
commit 7a4a132aff

View File

@ -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))
}) })