mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 22:03:39 +00:00
mostrar texto al comienzo y al final de la ficha
This commit is contained in:
parent
4c0f2c7ba3
commit
3998ddc5c6
2 changed files with 5 additions and 1 deletions
|
@ -22,7 +22,7 @@ class Post
|
||||||
# datos que no tienen que terminar en el front matter
|
# datos que no tienen que terminar en el front matter
|
||||||
REJECT_FROM_FRONT_MATTER = %w[date slug ext].freeze
|
REJECT_FROM_FRONT_MATTER = %w[date slug ext].freeze
|
||||||
# datos que no traemos del template
|
# datos que no traemos del template
|
||||||
REJECT_FROM_TEMPLATE = %w[draft categories layout title ext tags date slug].freeze
|
REJECT_FROM_TEMPLATE = %w[draft categories layout title ext tags date slug post pre].freeze
|
||||||
DEFAULT_PARAMS = [:title, :date, :content, :slug, :cover,
|
DEFAULT_PARAMS = [:title, :date, :content, :slug, :cover,
|
||||||
:layout, :permalink, :dir,
|
:layout, :permalink, :dir,
|
||||||
{ lang: {} }, { tags: [] }, { categories: [] }]
|
{ lang: {} }, { tags: [] }, { categories: [] }]
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
- else
|
- else
|
||||||
- url = site_post_path(@site, @post, lang: @lang)
|
- url = site_post_path(@site, @post, lang: @lang)
|
||||||
- method = :patch
|
- method = :patch
|
||||||
|
- if pre = @post.template.get_front_matter('pre')
|
||||||
|
= render 'layouts/help', help: CommonMarker.render_doc(pre).to_html
|
||||||
= form_tag url, method: method, class: 'form', novalidate: true, multipart: true do
|
= form_tag url, method: method, class: 'form', novalidate: true, multipart: true do
|
||||||
= hidden_field_tag 'template', params[:template]
|
= hidden_field_tag 'template', params[:template]
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -123,3 +125,5 @@
|
||||||
.invalid-feedback= t('posts.invalid')
|
.invalid-feedback= t('posts.invalid')
|
||||||
.form-group
|
.form-group
|
||||||
= submit_tag t('posts.save'), class: 'btn btn-success submit-post'
|
= submit_tag t('posts.save'), class: 'btn btn-success submit-post'
|
||||||
|
- if post = @post.template.get_front_matter('post')
|
||||||
|
= render 'layouts/help', help: CommonMarker.render_doc(post).to_html
|
||||||
|
|
Loading…
Reference in a new issue