From 315bebe5be8e77a312f6aaa04d36b691eb5cf10a Mon Sep 17 00:00:00 2001 From: davidtsadler Date: Thu, 29 Dec 2011 20:55:30 +0000 Subject: Add excerpts. Main index page shows exceprts of posts using plugin. --- _site_build/_plugins/posts.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 _site_build/_plugins/posts.rb (limited to '_site_build/_plugins') diff --git a/_site_build/_plugins/posts.rb b/_site_build/_plugins/posts.rb new file mode 100644 index 0000000..58d0128 --- /dev/null +++ b/_site_build/_plugins/posts.rb @@ -0,0 +1,9 @@ +module Jekyll + module ExcerptFilter + def text_excerpt(text) + text.split(@context.registers[:site].config['excerpt_tag']).first + end + end +end + +Liquid::Template.register_filter(Jekyll::ExcerptFilter) -- cgit v1.2.3-13-gbd6f