move self.type to convertible
This commit is contained in:
parent
2b275ef192
commit
960e01cba8
|
@ -106,6 +106,16 @@ module Jekyll
|
||||||
defaults.merge(data).deep_merge(further_data)
|
defaults.merge(data).deep_merge(further_data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def type
|
||||||
|
if is_a?(Post)
|
||||||
|
:post
|
||||||
|
elsif is_a?(Page)
|
||||||
|
:page
|
||||||
|
elsif is_a?(Draft)
|
||||||
|
:draft
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Recursively render layouts
|
# Recursively render layouts
|
||||||
#
|
#
|
||||||
# layouts - a list of the layouts
|
# layouts - a list of the layouts
|
||||||
|
|
|
@ -13,10 +13,6 @@ module Jekyll
|
||||||
name =~ MATCHER
|
name =~ MATCHER
|
||||||
end
|
end
|
||||||
|
|
||||||
def type
|
|
||||||
:draft
|
|
||||||
end
|
|
||||||
|
|
||||||
# Get the full path to the directory containing the draft files
|
# Get the full path to the directory containing the draft files
|
||||||
def containing_dir(source, dir)
|
def containing_dir(source, dir)
|
||||||
File.join(source, dir, '_drafts')
|
File.join(source, dir, '_drafts')
|
||||||
|
|
|
@ -34,10 +34,6 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def type
|
|
||||||
:page
|
|
||||||
end
|
|
||||||
|
|
||||||
# The generated directory into which the page will be placed
|
# The generated directory into which the page will be placed
|
||||||
# upon generation. This is derived from the permalink or, if
|
# upon generation. This is derived from the permalink or, if
|
||||||
# permalink is absent, we be '/'
|
# permalink is absent, we be '/'
|
||||||
|
|
|
@ -69,10 +69,6 @@ module Jekyll
|
||||||
self.populate_tags
|
self.populate_tags
|
||||||
end
|
end
|
||||||
|
|
||||||
def type
|
|
||||||
:post
|
|
||||||
end
|
|
||||||
|
|
||||||
def published?
|
def published?
|
||||||
if self.data.has_key?('published') && self.data['published'] == false
|
if self.data.has_key?('published') && self.data['published'] == false
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in New Issue