el slug es el layout

This commit is contained in:
f 2018-05-11 12:12:23 -03:00
parent cf93ba743d
commit f589d747fd
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -216,7 +216,11 @@ class Post
def front_matter_from_template def front_matter_from_template
return {} unless @template return {} unless @template
@template.front_matter # Convertimos el slug en layout
ft = @template.front_matter.dup
ft['layout'] = ft.delete('slug')
ft
end end
# Genera un post nuevo y lo agrega a la colección del sitio. # Genera un post nuevo y lo agrega a la colección del sitio.