add draft? method to identify if Post is a draft

This commit is contained in:
Will Norris 2015-02-13 23:56:37 -08:00
parent 461ea2f147
commit 58dc1f77e9
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ module Jekyll
content content
excerpt excerpt
excerpt_separator excerpt_separator
draft?
] ]
# Post name validator. Post filenames must be like: # Post name validator. Post filenames must be like:
@ -305,6 +306,11 @@ module Jekyll
end end
end end
# Returns if this Post is a Draft
def draft?
is_a?(Jekyll::Draft)
end
protected protected
def extract_excerpt def extract_excerpt