From f589d747fdc30458ca66ee1fbb3e628b97c6f77b Mon Sep 17 00:00:00 2001 From: f Date: Fri, 11 May 2018 12:12:23 -0300 Subject: [PATCH] el slug es el layout --- app/models/post.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index b32e034..f26139c 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -216,7 +216,11 @@ class Post def front_matter_from_template return {} unless @template - @template.front_matter + # Convertimos el slug en layout + ft = @template.front_matter.dup + ft['layout'] = ft.delete('slug') + + ft end # Genera un post nuevo y lo agrega a la colección del sitio.