From 58dc1f77e9084d8b147a39ad4ab4023e33aa8646 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 13 Feb 2015 23:56:37 -0800 Subject: [PATCH] add draft? method to identify if Post is a draft --- lib/jekyll/post.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 64fd485f..c74522a9 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -24,6 +24,7 @@ module Jekyll content excerpt excerpt_separator + draft? ] # Post name validator. Post filenames must be like: @@ -305,6 +306,11 @@ module Jekyll end end + # Returns if this Post is a Draft + def draft? + is_a?(Jekyll::Draft) + end + protected def extract_excerpt