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-07-19 16:49:24 +02:00
|
|
|
First, 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-07-19 16:49:24 +02:00
|
|
|
### Presentation at site root
|
2018-05-01 09:26:56 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Create `content/_index.md`:
|
2018-05-01 09:26:56 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
```markdown
|
|
|
|
+++
|
|
|
|
outputs = ["Reveal"]
|
|
|
|
+++
|
2018-05-01 09:26:56 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
# Slide 1
|
|
|
|
|
|
|
|
Hello world!
|
|
|
|
```
|
2018-05-01 09:26:56 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
### Add slides in same file
|
2018-05-01 10:46:00 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Separate them by `---`:
|
2018-05-01 10:46:00 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
# Slide 1
|
|
|
|
|
|
|
|
Hello world!
|
|
|
|
|
2018-05-01 10:46:00 +02:00
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
# Slide 2
|
2018-05-01 09:26:56 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Hello program!
|
2018-05-01 09:26:56 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
### Add slides with other files
|
|
|
|
|
|
|
|
Add slides to `content/home/*.md`
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
|
|
|
weight = 10
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 3
|
2018-05-01 09:26:56 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
# Slide 4
|
|
|
|
```
|
|
|
|
|
|
|
|
<small>💡 Tip: Use `weight` to specify the order that files should be added.</small>
|
2018-05-16 04:15:36 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
### Presentation at '/{section}/'
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
In `content/{section}/_index.md`:
|
2018-04-30 20:04:48 +02:00
|
|
|
|
|
|
|
```markdown
|
|
|
|
+++
|
|
|
|
outputs = ["Reveal"]
|
|
|
|
+++
|
|
|
|
|
|
|
|
# Slide 1
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Slide 2
|
2018-07-19 16:49:24 +02:00
|
|
|
|
2018-04-30 20:04:48 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Add slides from other files in `content/{section}/*.md`
|
2018-04-30 20:04:48 +02:00
|
|
|
|
|
|
|
```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-07-19 16:49:24 +02:00
|
|
|
<small>💡 Tip: Use `weight` to specify the order that files should be added.</small>
|
|
|
|
|
|
|
|
---
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
# Configuration
|
2018-04-30 20:04:48 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
## Reveal.js themes
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Put in `config.toml` or a presentation's front matter.
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
Use the `theme` key for themes that come with Reveal.js.
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
theme = "moon"
|
|
|
|
highlight_theme = "zenburn"
|
|
|
|
```
|
|
|
|
|
|
|
|
[Reveal.js themes](https://github.com/hakimel/reveal.js/#theming) ·
|
|
|
|
[highlight.js themes](https://highlightjs.org/static/demo/)
|
2018-04-30 20:04:48 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
## Use a custom theme
|
|
|
|
|
|
|
|
Use the `custom_theme` key to point to a CSS file in the `static` directory.
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
custom_theme = "reveal-hugo/themes/robot-lung.css"
|
2018-04-30 20:04:48 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
## Like this theme?
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
reveal-hugo comes with 2 extra Reveal.js themes:
|
2018-04-30 20:04:48 +02:00
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
- [robot-lung](https://github.com/dzello/revealjs-themes#robot-lung) (this one)
|
|
|
|
- [sunblind](https://github.com/dzello/revealjs-themes#sunblind)
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<small>
|
|
|
|
They live in the `static/reveal-hugo/themes` folder and also [on Github](https://github.com/dzello/revealjs-themes).
|
|
|
|
</small>
|
2018-04-30 20:13:10 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
## Reveal.js params
|
|
|
|
|
|
|
|
Set **snakecase** versions of Reveal.js params, which will be camelized and passed to `Reveal.initialize`.
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[params.reveal_hugo]
|
|
|
|
history = true
|
|
|
|
slide_number = true
|
|
|
|
transition = 'zoom'
|
|
|
|
transition_speed = 'fast'
|
2018-04-30 20:04:48 +02:00
|
|
|
```
|
|
|
|
|
2018-07-19 16:49:24 +02:00
|
|
|
[Full list of params](https://github.com/hakimel/reveal.js/#configuration)
|