chalk icon indicating copy to clipboard operation
chalk copied to clipboard

Multi-language reading time estimate

Open haojian opened this issue 5 years ago • 0 comments

Hi,

The current reading time (e.g., x minutes read) estimate the time by counting only the number of English words. I want to create a pull request to add multi-language support. I located the relevant code is in "index.html".

{{ post.date | date: "%B %-d, %Y" }} - {% capture words %} {{ post.content | number_of_words }} {% endcapture %} {% unless words contains "-" %} {{ words | plus: 250 | divided_by: 250 | append: " minute read" }} {% endunless %} - {% for tag in post.tags %} {{ tag }} {% endfor %}

I am wondering how can I make the changes?
Any help or pointers are appreciated. I have little experience with Ruby.

haojian avatar Oct 26 '19 15:10 haojian