Functions to do word count, reading time

I haven’t seen that Zola has any standard way of adding a word count/reading time to blog posts. Is there something I’m missing?

In theory, could I add utility functions to do this, then call them somehow? This may be a little beyond me to implement, mostly thinking aloud.

Thanks.

There is: Sections and Pages | Zola

See word_count and reading_time.

2 Likes

I’m blind and stupid, thanks for pointing me in the right direction!

Do word_count and reading_time work in versions of Zola below 0.19.1? Once again, my theme author hasn’t enabled them in his templating. I was thinking perhaps I could learn how to override. I settled on compiling 0.18 and keeping a dedicated binary in with the project, which solved my woes with the Zerm theme, but this could break the ability to use newer things.

I don’t believe there has been any changes on that in recent versions and it’s not possible to disable it.

1 Like

I’ll have to dive into the theme then and see if I can add it via my own template modification.

Figured it out. Also feel more comfortable now overriding templates with my own things. Getting there! :slight_smile:

2 Likes