Website Summary Files Commits Branches @commit @diff @stats
path: root / exampleSite / data
diff options
context:
space:
mode:
Commitad823cc4d72edbab10f0dadf99b30df91c3f7c50 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-16 08:38:04 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-16 08:38:04 +0300
Files6666a19acc2316d6ad5ad00291066d6d6fd42a5b /exampleSite/data
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.tar
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.tar.gz
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.zip
Squashed 'website/themes/reveal-hugo/' content from commit ff9f389
git-subtree-dir: website/themes/reveal-hugo git-subtree-split: ff9f389743ae2fe5c5cc6101455db0616e8548e2
2 files changed, 65 insertions, 0 deletions
-rw-r--r--exampleSite/data/common/nested.toml19
-rw-r--r--exampleSite/data/home.toml46
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"
+```
+<br>
+
+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 <hr> 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.
+
+<br>
+<small>
+navigate down to learn more
+</small>
+<br>
+<a href="#" class="navigate-down">🔽</a>
+
+---
+
+Add a `example` key to data/home.toml:
+
+```toml
+example = "I'm a slide"
+```
+<br>
+
+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
+
+'''