From 1d7250f48d6eca33df573d58451fc150aa7456a5 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Thu, 29 Mar 2018 09:35:05 +0200 Subject: [PATCH] Added a wrapper shortcode. --- README.md | 23 +++++++++++++++++++++-- layouts/shortcodes/wrapper.html | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 layouts/shortcodes/wrapper.html diff --git a/README.md b/README.md index d753834..2d09475 100644 --- a/README.md +++ b/README.md @@ -166,15 +166,34 @@ Zen comes with a improved version of the built in "figure" shortcut. Break float. ``` -{{% figure src="/images/image.jpg" class="right" %}} +{{< figure src="/images/image.jpg" class="right" >}} blablabla # Displayed left of the image. -{{% clear %}} +{{< clear >}} blablabla # Displayed below of the image. ``` +### Wrapper + +A simple, but useful, shortcode to wrap content in a div with a class. + +``` +{{% wrapper class-name-you-want %}} +The **content** that should be wrapped. +{{% /wrapper %}} +``` + +This will produce: + +``` +
+The content that should be wrapped. +
+``` + + ## Use Gulp to generate css from sass Your new Zen theme uses Gulp.js as a task runner, so that it can do many diff --git a/layouts/shortcodes/wrapper.html b/layouts/shortcodes/wrapper.html new file mode 100644 index 0000000..2828268 --- /dev/null +++ b/layouts/shortcodes/wrapper.html @@ -0,0 +1 @@ +
{{ .Inner }}