diff --git a/source/layouts/post.haml b/source/layouts/post.haml index 423b1d3..918b2ed 100644 --- a/source/layouts/post.haml +++ b/source/layouts/post.haml @@ -17,6 +17,10 @@ = current_article.date.strftime(blog_settings.date_format) - if tags? about #{tags} + | + - words = Nokogiri::HTML::DocumentFragment.parse(yield).search('.//text()').map(&:text).join(' ').split.count + = [1, (words / 200.0).round].max # average reading speed as of http://EzineArticles.com/2298503 + min read %section.post-content= yield