Add wrapper start and end shortcodes. Make editing in Cloudcannon easier since we can avoid nested shortcodes.
This commit is contained in:
parent
4d54f7877a
commit
34a0a39352
3 changed files with 26 additions and 0 deletions
|
|
@ -378,3 +378,27 @@ _snippets:
|
|||
- editor_key: display
|
||||
type: string
|
||||
optional: true
|
||||
|
||||
zen_wrapper_start:
|
||||
template: hugo_markdown_shortcode_positional_args
|
||||
inline: false
|
||||
preview:
|
||||
icon: wrap_text
|
||||
text: Wrapper start
|
||||
subtext:
|
||||
- key: class
|
||||
- No class
|
||||
definitions:
|
||||
shortcode_name: wrapper-start
|
||||
positional_args:
|
||||
- editor_key: class
|
||||
type: string
|
||||
|
||||
zen_wrapper_end:
|
||||
template: hugo_markdown_shortcode
|
||||
inline: false
|
||||
preview:
|
||||
icon: wrap_text
|
||||
text: Wrapper end
|
||||
definitions:
|
||||
shortcode_name: wrapper-end
|
||||
|
|
|
|||
1
layouts/shortcodes/wrapper-end.html
Normal file
1
layouts/shortcodes/wrapper-end.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
</div>
|
||||
1
layouts/shortcodes/wrapper-start.html
Normal file
1
layouts/shortcodes/wrapper-start.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<div class="{{ .Get 0 }}">
|
||||
Loading…
Reference in a new issue