Skip to content

Instantly share code, notes, and snippets.

View foobartel's full-sized avatar

Holger Bartel foobartel

View GitHub Profile
@zachleat
zachleat / reading_time.rb
Last active October 21, 2020 23:00
Read this in X minutes Liquid Filter Plugin (for Jekyll)
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180