Open athityakumar opened 7 years ago
Reference: https://help.medium.com/hc/en-us/articles/214991667-Read-time
A simple way to calculate would be:
require 'yaml' READING_SPEED = 265 # Same as Medium article = YAML.load(File.read("auto/data/posts/#{post_name}.yml")) words_count = article["html_content"].count(" ") x_minutes = words_count/READING_SPEED + 1
Reference: https://help.medium.com/hc/en-us/articles/214991667-Read-time
A simple way to calculate would be: