mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:31:41 +00:00
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!
|
||||
clean_content!
|
||||
slugify_title!
|
||||
remove_empty_front_matter!
|
||||
end
|
||||
|
||||
def remove_empty_front_matter!
|
||||
@front_matter.delete_if do |k,v|
|
||||
v.blank?
|
||||
end
|
||||
end
|
||||
|
||||
# Aplica limpiezas básicas del contenido
|
||||
|
|
Loading…
Reference in a new issue