5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-07 09:35:45 +00:00

get_front_matter no acepta simbolos

This commit is contained in:
f 2018-07-20 13:41:59 -03:00
parent 21aedce0ea
commit 2a0279d669
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -5,7 +5,7 @@
%li= error
-# TODO seleccionar la dirección por defecto según el idioma actual
- direction = @post.get_front_matter(:dir) || 'ltr'
- direction = @post.get_front_matter('dir') || 'ltr'
-# string para configurar la clase con direccion de texto
- field_class = "form-control #{direction}"
-# TODO habilitar form_for
@ -64,13 +64,13 @@
%small.text-muted.form-text= t('posts.slug_help')
.form-group
= label_tag 'post_permalink', t('posts.permalink')
= text_field 'post', 'permalink', value: @post.get_front_matter(:permalink),
= text_field 'post', 'permalink', value: @post.get_front_matter('permalink'),
class: 'form-control'
%small.text-muted.form-text= t('posts.permalink_help')
.form-group
= label_tag 'post_layout', t('posts.layout')
= select_tag 'post[layout]',
options_for_select(@site.layouts, @post.get_front_matter(:layout)),
options_for_select(@site.layouts, @post.get_front_matter('layout')),
{ class: 'form-control select2' }
%small.text-muted.form-text= t('posts.layout_help')
- if @site.i18n?
@ -80,7 +80,7 @@
= label_tag 'post_lang', t("posts.lang.#{lang}")
= select_tag "post[lang][#{lang}]",
options_for_select(@site.posts_for(lang).map { |p| [p.title, p.id] },
@post.get_front_matter(:lang).try(:dig, lang)),
@post.get_front_matter('lang').try(:dig, lang)),
{ class: 'form-control select2' }
%small.text-muted.form-text= t('posts.lang_help')
-# Genera todos los campos de la plantilla