lib/cloudcannon-jekyll/generators/collections.rb in cloudcannon-jekyll-3.0.1 vs lib/cloudcannon-jekyll/generators/collections.rb in cloudcannon-jekyll-3.0.2
- old
+ new
@@ -155,11 +155,11 @@
end
def document_type(doc)
if IS_JEKYLL_2_X_X && (doc.instance_of?(Jekyll::Post) || doc.instance_of?(Jekyll::Draft))
:posts
- elsif doc.respond_to? :type
+ elsif doc.respond_to?(:type)
doc.type
elsif doc.respond_to?(:collection)
doc.collection.label.to_sym
elsif doc.instance_of?(Jekyll::Page)
:pages
@@ -186,14 +186,15 @@
def document_data(doc)
data = if legacy_doc?(doc)
legacy_document_data(doc)
elsif doc.respond_to?(:data)
- doc.data
+ doc.data.dup
else
{}
end
+ data.delete('excerpt')
defaults = @site.frontmatter_defaults.all(doc.relative_path, document_type(doc))
defaults.merge(data)
end
def document_url(doc)