How to using reading time #8318
Unanswered
tommypratama
asked this question in
Questions (Nuxt 2)
Replies: 1 comment
-
I'am starting using this way: methods: {
readingTime(content) {
let minutes = 0
const words = content.split(' ').length
const wordsPerMinute = 200
minutes = Math.ceil(words / wordsPerMinute)
return minutes
},
}, This works, but is there a better way? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using strapi as cms, and fetching data with Apollo Graphql.
Previously, I used
reading-time
onnuxt-content
via this documentation https://content.nuxtjs.org/advanced/.How to apply this concept to graphql data in nuxt?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions