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