CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers

Home Page:https://stack.jimmycai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Incorrect Prediction of Readtime

zayn7lie opened this issue · comments

What happened?

The predicted read time is obviously and crucially shorter than actual read time.

Hugo version

hugo v0.116.1+extended linux/amd64 BuildDate=unknown

Theme version

git version

What browsers are you seeing the problem on?

Firefox

More information about the browser

Arch Linux 6.4.7-arch1-2

Relevant log output

No response

Link to the page with bug

https://demo.stack.jimmycai.com

Link to the source repository

No response

commented

have you rendered locally and written with the page open and set it to draft before publishing?
according to my experience(not for sure)...actually, the read-time only counts in that situation and in most cases it is not correct 🥲🙏

have you rendered locally and written with the page open and set it to draft before publishing? according to my experience(not for sure)...actually, the read-time only counts in that situation and in most cases it is not correct 🥲🙏

Yes, I compile locally and then publish only /public folder to server.

I am not sure about the reason, here are some guessing (If available, I might review the code of concerning parts):

  • Difference between English words and Chinese Characters.
  • Ignorant of some parts like code block, quote, etc.
  • Ignorant of thinking and reviewing time (Most blogs are focusing on introduction and tutor of some techniques. I think these time should be taken into consideration.)
  • I've just seen that Stack Theme using readingTime parameter from Hugo instead of using a new script, it is also possible that the problem belongs to Hugo.

By the way, from my viewpoint, predicted read time is of importance for that people could assign and plan their time properly. Accurate read time prediction could boost the efficiency significantly.

I've just seen that Stack Theme using readingTime parameter from Hugo instead of using a new script, it is also possible that the problem belongs to Hugo.

Yes, this theme uses Hugo's readingTime directly. You'll have to report this issue to them instead.

You can set the hasCJKLanguage in config,yaml for [zh-cn ja ko] languages
hasCJKLanguage: true
Then the read time should be right.