Question
Closed · Answered

Where should an article’s estimated reading time be calculated?

Hovhannes Vktarget

When adding reading time to a website using Busa CMS, should the value be stored with the article or calculated by the website from its Markdown content? How are Chinese text, English text, code blocks, and tables usually handled in that calculation?

Report
Kelly
Team

Calculate it from the article’s Markdown when the page is rendered. You don’t need to store a reading-time field on the article for this estimate.

Diagram · Reading time from Markdown

Why calculate it at display time

Busabase CMS’s blog helper estimates minutes from the article’s Markdown text as the page is shown. When the article changes, the estimate updates with it, so you don’t have to remember to rewrite a stored number.

Store a separate field only if you need the number for something this estimate isn’t for — for example sorting or filtering articles by length in a data table, or a custom page that doesn’t use this calculation.

How Chinese, English, code, and tables are counted

The estimate treats different kinds of text differently:

  • English (and other space-separated languages) is counted as words, at 200 words per minute.
  • Chinese, Japanese, and Korean are counted by character, at 300 characters per minute. Mixed articles add both parts together.
  • Front matter at the top of the Markdown and fenced code blocks (the sections wrapped in triple backticks) are left out, so a long code sample does not inflate the time.
  • Tables are not stripped out: the visible wording in table cells is counted as ordinary words or characters.
  • The result is a whole number of minutes, and it is never less than 1, even for a very short article.

How to verify

Open an article page that shows the estimate and compare it with a rough count of the body (not the code blocks). After you add or remove a few paragraphs of prose, refresh the page and confirm the number moves; adding only a fenced code block should not.

Boundaries

  • This estimate is for reading the prose, not for watching embedded videos or studying every line of code.
  • If your published page does not yet show a reading-time line, you can still use the same rules when you add that line to the layout — you still don’t have to store the number on the article record.
Report

Your reply

Sign in to join the discussion. Reading is always open; you only need an account to post.

Sign in