From 34a0a393525589a3e910c7c083607da44e7d9d8f Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Mon, 16 Oct 2023 17:51:35 +0200 Subject: [PATCH] Add wrapper start and end shortcodes. Make editing in Cloudcannon easier since we can avoid nested shortcodes. --- cloudcannon.config.yaml.example | 24 ++++++++++++++++++++++++ layouts/shortcodes/wrapper-end.html | 1 + layouts/shortcodes/wrapper-start.html | 1 + 3 files changed, 26 insertions(+) create mode 100644 layouts/shortcodes/wrapper-end.html create mode 100644 layouts/shortcodes/wrapper-start.html diff --git a/cloudcannon.config.yaml.example b/cloudcannon.config.yaml.example index a25f755..583bf50 100644 --- a/cloudcannon.config.yaml.example +++ b/cloudcannon.config.yaml.example @@ -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 diff --git a/layouts/shortcodes/wrapper-end.html b/layouts/shortcodes/wrapper-end.html new file mode 100644 index 0000000..04f5b84 --- /dev/null +++ b/layouts/shortcodes/wrapper-end.html @@ -0,0 +1 @@ + diff --git a/layouts/shortcodes/wrapper-start.html b/layouts/shortcodes/wrapper-start.html new file mode 100644 index 0000000..5ed6a59 --- /dev/null +++ b/layouts/shortcodes/wrapper-start.html @@ -0,0 +1 @@ +