From 54ed796610be3c5e4fcefbd0196d6da524db53a5 Mon Sep 17 00:00:00 2001 From: dzello Date: Mon, 30 Apr 2018 01:01:10 -0700 Subject: [PATCH] Add a shortcode for adding vertical sections --- README.md | 16 ++++++++++++++++ exampleSite/content/sections/_index.md | 23 +++++++++++++++++++++++ layouts/shortcodes/section.html | 1 + 3 files changed, 40 insertions(+) create mode 100644 exampleSite/content/sections/_index.md create mode 100644 layouts/shortcodes/section.html diff --git a/README.md b/README.md index ffdd2a1..380bcc0 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,22 @@ Fragments are a Reveal.js concept that lets you introduce content into each slid {{% fragment %}} Three {{% /fragment %}} ``` +### Sections + +Add sections of vertical slides to your presentation by surrounding the relevant slides with the `section` shortcode. + +```markdown +{{% section %}} + +# Section slide 1 + +--- + +# Section slide 2 + +{{% /section %}} +``` + ### Configuration params These settings go in `config.toml`: diff --git a/exampleSite/content/sections/_index.md b/exampleSite/content/sections/_index.md new file mode 100644 index 0000000..83bbc53 --- /dev/null +++ b/exampleSite/content/sections/_index.md @@ -0,0 +1,23 @@ ++++ +title = "Reveal.js presentation sections example" +outputs = ["Reveal"] +reveal_theme = "moon" ++++ + +Test + +--- + +{{% section %}} + +Two + +--- + +Three + +{{% /section %}} + +--- + +Four diff --git a/layouts/shortcodes/section.html b/layouts/shortcodes/section.html new file mode 100644 index 0000000..a730cf5 --- /dev/null +++ b/layouts/shortcodes/section.html @@ -0,0 +1 @@ +
{{ .Inner }}
\ No newline at end of file