diff --git a/app/models/site/index.rb b/app/models/site/index.rb index dc9f266f..213ef0bb 100644 --- a/app/models/site/index.rb +++ b/app/models/site/index.rb @@ -20,7 +20,7 @@ class Site jekyll.documents.each do |doc| doc.read! - Post.new(document: doc, site: self, layout: doc['layout'].to_sym).index! + Post.build(document: doc, site: self, layout: doc['layout'].to_sym).index! end update(last_indexed_commit: repository.head_commit.oid)