CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
4.89k stars 1.6k forks source link

[Bug]: Incorrect Prediction of Readtime #854

Closed zayn7lie closed 1 year ago

zayn7lie commented 1 year ago

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

Lovirr commented 1 year ago

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 🥲🙏

zayn7lie commented 1 year ago

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):

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.

CaiJimmy commented 1 year ago

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.

yangmingxian commented 11 months ago

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