mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +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
|
||||
REJECT_FROM_FRONT_MATTER = %w[date slug ext].freeze
|
||||
# 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,
|
||||
:layout, :permalink, :dir,
|
||||
{ lang: {} }, { tags: [] }, { categories: [] }]
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
- else
|
||||
- url = site_post_path(@site, @post, lang: @lang)
|
||||
- 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
|
||||
= hidden_field_tag 'template', params[:template]
|
||||
.form-group
|
||||
|
@ -123,3 +125,5 @@
|
|||
.invalid-feedback= t('posts.invalid')
|
||||
.form-group
|
||||
= 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