hellotham / hello-astro

Hello Astro is a multi purpose Astro starter theme written in Typescript, TailwindCSS and AlpineJS. It supports Markdown and MDX based pages and blog posts.
https://hellotham.github.io/hello-astro
MIT License
158 stars 55 forks source link

Reading Time on blog index #17

Closed ferrarafer closed 1 year ago

ferrarafer commented 1 year ago

Hello, I just cloned the repository and when I run it I'm not seeing the reading time of each post on blog path but on your website is there, do you know why?

Thanks in advance!

ChristineTham commented 1 year ago

Hello, I just cloned the repository and when I run it I'm not seeing the reading time of each post on blog path but on your website is there, do you know why?

Thanks in advance!

Unfortunately I had to take this feature out when the starter transitioned to using collections, as reading time has not yet been calculated when calling GetCollection(). To reimplement this feature would require bypassing collections or manually invoking markdown parsing when displaying a collection of blog pages. Let me know if you have any suggestions on this matter. Also, Markdoc pages do not currently process remark plugins including the reading time calculator.

PS: the reading time should display on individual Markdown and MDX blog pages, but not Markdoc pages.