subtitulo para las secciones
This commit is contained in:
parent
e894af7c83
commit
5f357673fb
2 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,10 @@ class Post
|
|||
contents.dig('title') if complex?
|
||||
end
|
||||
|
||||
def subtitle
|
||||
contents.dig('subtitle') if complex?
|
||||
end
|
||||
|
||||
# Obtiene el valor
|
||||
def value
|
||||
complex? ? contents.dig('value') : contents
|
||||
|
|
|
@ -119,6 +119,8 @@
|
|||
- next unless type = template.type
|
||||
- if template.title.present?
|
||||
%h1{id: template.title.tr(' ', '_').titleize}= template.title
|
||||
- if template.subtitle.present?
|
||||
%p= template.subtitle
|
||||
- value = @post.new? ? template.values : @post.get_front_matter(template.key)
|
||||
.form-group
|
||||
= label_tag "post_#{template}", id: template do
|
||||
|
|
Loading…
Reference in a new issue