Skip to content

Instantly share code, notes, and snippets.

@zachleat
zachleat / reading_time.rb
Last active March 20, 2025 09:04
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