2018-04-30 13:04:48 -05:00
|
|
|
+++
|
|
|
|
weight = 20
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-04-30 13:13:10 -05:00
|
|
|
## Prerequisite
|
2018-04-30 13:04:48 -05:00
|
|
|
|
2018-04-30 13:13:10 -05:00
|
|
|
Add this to your `config.toml`:
|
2018-04-30 13:04:48 -05:00
|
|
|
|
2018-04-30 13:13:10 -05:00
|
|
|
```toml
|
|
|
|
[outputFormats.Reveal]
|
|
|
|
baseName = "index"
|
|
|
|
mediaType = "text/html"
|
|
|
|
isHTML = true
|
2018-04-30 13:04:48 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-05-01 02:26:56 -05:00
|
|
|
## Configure themes
|
|
|
|
|
|
|
|
Optional. In `config.toml` or front matter.
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
theme = "moon"
|
|
|
|
highlight_theme = "zenburn"
|
|
|
|
```
|
|
|
|
|
2018-05-01 03:46:00 -05:00
|
|
|
[Reveal.js themes](https://github.com/hakimel/reveal.js/#theming) ·
|
2018-05-01 02:26:56 -05:00
|
|
|
[highlight.js themes](https://highlightjs.org/static/demo/)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-05-01 03:46:00 -05:00
|
|
|
## Custom Reveal.js theme
|
|
|
|
|
|
|
|
Point to a file in the `static` directory.
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
custom_theme = "themes/dzello.css"
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-05-01 02:26:56 -05:00
|
|
|
## Configure Reveal.js
|
|
|
|
|
|
|
|
Set **snakecase** versions of Reveal.js params, which will be passed to `Reveal.initialize`.
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
slide_number = true
|
|
|
|
transition_speed = 'fast'
|
|
|
|
```
|
|
|
|
|
|
|
|
[Reveal config params](https://github.com/hakimel/reveal.js/#configuration)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-04-30 20:47:20 -05:00
|
|
|
## Presentation for `/`
|
2018-04-30 13:04:48 -05:00
|
|
|
|
|
|
|
In `content/_index.md`:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
|
|
|
outputs = ["Reveal"]
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 1
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Slide 2
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Put more slides in `content/home/*.md`
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
2018-04-30 13:13:10 -05:00
|
|
|
weight = 10
|
2018-04-30 13:04:48 -05:00
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 3
|
2018-04-30 13:13:10 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Slide 4
|
2018-04-30 13:04:48 -05:00
|
|
|
```
|
|
|
|
|
2018-04-30 20:47:20 -05:00
|
|
|
Use `weight` to specify the order relative to other files.
|
2018-04-30 13:04:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-04-30 20:47:20 -05:00
|
|
|
## For any Hugo section
|
2018-04-30 13:04:48 -05:00
|
|
|
|
|
|
|
In `content/{section}/_index.md`:
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
|
|
|
outputs = ["Reveal"]
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 1
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Slide 2
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Put more slides in `content/{section}/*.md`
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
2018-04-30 13:13:10 -05:00
|
|
|
weight = 10
|
2018-04-30 13:04:48 -05:00
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 3
|
2018-04-30 13:13:10 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Slide 4
|
2018-04-30 13:04:48 -05:00
|
|
|
```
|
|
|
|
|
2018-04-30 20:47:20 -05:00
|
|
|
Use `weight` to specify the order relative to other files.
|