Add check if blogpost has attribute
This commit is contained in:
parent
d184ffc306
commit
6c6814f69a
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ module PreprocessHelper
|
||||||
|
|
||||||
def update_blog_attributes
|
def update_blog_attributes
|
||||||
@items.find_all('/blog/**/*').each do |i|
|
@items.find_all('/blog/**/*').each do |i|
|
||||||
|
raise "#{i.identifier} doesn't have 'created_at'" unless i[:created_at]
|
||||||
i.update_attributes(
|
i.update_attributes(
|
||||||
# Tag all posts with article (for Blogging helper)
|
# Tag all posts with article (for Blogging helper)
|
||||||
kind: 'article',
|
kind: 'article',
|
||||||
|
|
Loading…
Reference in a new issue