mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-05-18 21:03:29 +02:00
Add example presentation for using slide templates; investigating #26
This commit is contained in:
@@ -8,10 +8,15 @@ themesDir = "../"
|
||||
[author]
|
||||
name = "Josh Dzielak"
|
||||
|
||||
[params.reveal_hugo]
|
||||
history = true
|
||||
|
||||
[outputFormats.Reveal]
|
||||
baseName = "index"
|
||||
mediaType = "text/html"
|
||||
isHTML = true
|
||||
|
||||
[params.reveal_hugo]
|
||||
history = true
|
||||
|
||||
# used in content/template-example
|
||||
[params.reveal_hugo.templates.grey]
|
||||
background = "#424242"
|
||||
transition = "convex"
|
||||
@@ -0,0 +1,45 @@
|
||||
+++
|
||||
title = "Template presentation"
|
||||
outputs = ["Reveal"]
|
||||
[reveal_hugo]
|
||||
theme = "night"
|
||||
margin = 0.2
|
||||
[reveal_hugo.templates.blue]
|
||||
background = "#0011DD"
|
||||
transition = "zoom"
|
||||
+++
|
||||
|
||||
## Template Example
|
||||
|
||||
---
|
||||
|
||||
This presentation shows how to take advantage of reveal-hugo's slide template feature.
|
||||
|
||||
---
|
||||
|
||||
Slide templates let you specify groups of slide attributes in one place and reuse them throughout the presentation.
|
||||
|
||||
---
|
||||
|
||||
{{< slide template="blue" >}}
|
||||
|
||||
Here's an example of using a template called `blue`, defined in the front matter of this presentation's `_index.md` file.
|
||||
|
||||
---
|
||||
|
||||
The template can contain any valid slide customization params:
|
||||
|
||||
```toml
|
||||
[reveal_hugo.templates.blue]
|
||||
background = "#0011DD"
|
||||
transition = "zoom"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Then add it to any slide using the slide shortcode:
|
||||
|
||||
```
|
||||
{{</* slide template="blue" */>}}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
+++
|
||||
+++
|
||||
|
||||
{{< slide template="grey" >}}
|
||||
|
||||
Templates can be specified in `config.toml` as well, for reusability across multiple presentations.
|
||||
|
||||
```
|
||||
[params.reveal_hugo.templates.grey]
|
||||
background = "#424242"
|
||||
transition = "convex"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## THE END
|
||||
Reference in New Issue
Block a user