eliminar valores vacios del frontmatter closes #35
This commit is contained in:
parent
d8823fa6f1
commit
75295531c6
1 changed files with 7 additions and 0 deletions
|
@ -232,6 +232,13 @@ class Post
|
||||||
date_to_time!
|
date_to_time!
|
||||||
clean_content!
|
clean_content!
|
||||||
slugify_title!
|
slugify_title!
|
||||||
|
remove_empty_front_matter!
|
||||||
|
end
|
||||||
|
|
||||||
|
def remove_empty_front_matter!
|
||||||
|
@front_matter.delete_if do |k,v|
|
||||||
|
v.blank?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Aplica limpiezas básicas del contenido
|
# Aplica limpiezas básicas del contenido
|
||||||
|
|
Loading…
Reference in a new issue