Skip to content

Instantly share code, notes, and snippets.

View gthln's full-sized avatar

Günther Theilen gthln

View GitHub Profile
@mrmwiebe
mrmwiebe / excerpt.js
Created April 1, 2015 11:52
Custom excerpt.js
// # Excerpt Helper
// Usage: `{{excerpt}}`, `{{excerpt words="50"}}`, `{{excerpt characters="256"}}`
//
// Attempts to remove all HTML from the string, and then shortens the result according to the provided option.
//
// Defaults to words="50"
/*
Added optional ability to use 2 <!--excerpt--> tags in your posts to specify exactly what will be