From ad823cc4d72edbab10f0dadf99b30df91c3f7c50 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 16 Aug 2020 08:38:04 +0300 Subject: Squashed 'website/themes/reveal-hugo/' content from commit ff9f389 git-subtree-dir: website/themes/reveal-hugo git-subtree-split: ff9f389743ae2fe5c5cc6101455db0616e8548e2 --- exampleSite/data/common/nested.toml | 19 +++++++++++++++ exampleSite/data/home.toml | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 exampleSite/data/common/nested.toml create mode 100644 exampleSite/data/home.toml (limited to 'exampleSite/data') diff --git a/exampleSite/data/common/nested.toml b/exampleSite/data/common/nested.toml new file mode 100644 index 0000000..1d5cd59 --- /dev/null +++ b/exampleSite/data/common/nested.toml @@ -0,0 +1,19 @@ +reusable = ''' + +You can organize reusables into folder. + +An an `example` key in `data/common/nested.toml` + +```toml +example = "I'm a slide" +``` +
+ +Set the `content` attribute to "common.nested.example": + +```markdown +{{< slide content="common.nested.example" >}} +``` + +''' + diff --git a/exampleSite/data/home.toml b/exampleSite/data/home.toml new file mode 100644 index 0000000..92a7aac --- /dev/null +++ b/exampleSite/data/home.toml @@ -0,0 +1,46 @@ +# Note: it seems that under goldmark, markdown in data templates has issues. +# In particular "---" is converted to
even inside code fences! + +reusable = ''' + +## Reusable slides + +Store markdown in a [data template](https://gohugo.io/templates/data-templates/) and reuse it in multiple sections or presentations. + +
+ +navigate down to learn more + +
+🔽 + +--- + +Add a `example` key to data/home.toml: + +```toml +example = "I'm a slide" +``` +
+ +Set the `content` attribute to "home.example": + +```markdown +{{< slide content="home.example" >}} +``` + +--- + +💡 Each data template entry can contain one or more slides, separated by `---` with newlines. + +--- + +💡 All other slide shortcode attributes (background, transition, etc.) can be used and will be applied to each slide in the data template entry. + +--- + +💡 Adding a new file in `data` folder requires to restart `hugo` + +💡 Symbolinc links are not allowed in `data` folder + +''' -- cgit v1.3.1-23-gd82d