mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

edit | blame | history | raw

---
title: Calculate and show reading time

date: 2026-01-16T08:00:00.000+0700

The reading time displayed in layouts/_default/single.html can now be configured via a reading_speed parameter, instead of always using Hugo's computed .ReadingTime. (GitHub)

  • The theme still only shows reading time when show_reading_time = true is enabled (page param or section param). (GitHub)
  • The displayed value is now computed like this:
  • Default (no config): use Hugo's .ReadingTime as before. (GitHub)

  • With config: compute reading time as ceil(WordCount / .Site.Params.reading_speed) and pass the resulting integer into the existing readingTime i18n string. (GitHub)
  • This follows the approach described in GoHugo's ReadingTime documentation, including the multilingual use case. (gohugo.io)

Configuration

You can set reading_speed globally or per language. In multilingual sites, the recommended approach is language-specific params.reading_speed. (gohugo.io)

[languages]
  [languages.en.params]
    reading_speed = 228
  [languages.de.params]
    reading_speed = 179

Notes

  • GoHugo's default assumption is 212 words per minute (and 500 for CJK languages) when using .ReadingTime; setting reading_speed lets you align the displayed value with your own targets per language. (gohugo.io)
  • PR #801 proposed this feature for language params; the final implementation landed via commit 39e2145 (referencing #801) and applies the reading_speed override through .Site.Params.reading_speed. (GitHub)