diff --git a/Gemfile b/Gemfile index 68cc260..3500262 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,10 @@ gem 'therubyracer' # Autoprefixing for class gem 'autoprefixer-rails' +# Word counting gem (which takes special characters into account) +# for reading time +gem 'words_counted' + group :development do gem 'adsf' gem 'highline' diff --git a/Gemfile.lock b/Gemfile.lock index 452be76..791ddf4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,6 +79,7 @@ GEM w3c_validators (1.2) json nokogiri + words_counted (1.0.2) PLATFORMS ruby @@ -97,6 +98,7 @@ DEPENDENCIES terminal-notifier-guard therubyracer w3c_validators + words_counted BUNDLED WITH - 1.13.3 + 1.13.6 diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 9ad45b1..428f12d 100644 --- a/layouts/blogpost.erb +++ b/layouts/blogpost.erb @@ -15,7 +15,8 @@ <% end %>
- Created at <%= item[:created_at] %>
+ Geschreven op <%= item[:created_at] %>
+ Leestijd: <%= reading_time @item %>