next-mdx
next-mdx copied to clipboard
Add reading time, word count
Fantastic library, I'm really enjoying the simplicity it brings to building an mdx-powered site with relational data. It would be useful to add reading-time and wordCount parameters to the frontmatter. Would you accept a PR for this? Looking at the source, I believe it would be easiest to add these parameters in get-nodes.ts in the getFileData() function.
Fantastic library, I'm really enjoying the simplicity it brings to building an mdx-powered site with relational data.
Thank you.
It would be useful to add reading-time and wordCount parameters to the frontmatter.
I'm using reading-time for a few sites and I agree this would definitely be useful.
Wondering what would the implementation look like.
- We don't need this for all mdx types.
- Make this configurable via
next-mdx.json? - This adds a dependency on the reading-time package.
@bketelsen A quick update here. I've been working on a Table of Contents module and I think I have an idea how we can solve this with plugins.
I'll post here when I have a working prototype.
Thanks for your help. Really appreciate it.