gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.27k stars 10.31k forks source link

[gatsby-transformer-remark] Refactor wordCount and timeToRead to not count words twice #21357

Closed jlkiri closed 2 years ago

jlkiri commented 4 years ago

Summary

Currently words are counted twice, for each of wordCount and timeToRead fields. wordCount counts words as a custom step in the unified process, and timeToRead uses lodash. There might be a better way to unify the counting.

For example, solutions like retext-japanese could be used, but this particular library does not seem to work on my machine. Maybe wordCount could use logic that timeToRead uses now.

wardpeet commented 4 years ago

Hi, looks like you fixed your issue youreself which is ace! 💯 👏

Thank you! I'll be closing this issue, if this is not the case feel free to re-open or re-create it.

jlkiri commented 4 years ago

Ah, sorry, that PR was fixing the other issue and simply mentioned this one. This one is not resolved yet, but I'm working on it.

LekoArts commented 2 years ago

Hi!

I'm closing this as a stale issue as in the meantime Gatsby 4 and related packages were released. You can check our Framework Version Support Page to see which versions currently receive active support.

Please try the mentioned issue on the latest version (using the next tag) and if you still see this problem, open a new bug report. It must include a minimal reproduction.

Thanks!