2.2 KiB
2.2 KiB
+++ weight = 20 +++
Usage
Prerequisite
First, add this to your config.toml:
[outputFormats.Reveal]
baseName = "index"
mediaType = "text/html"
isHTML = true
Presentation at site root
Create content/_index.md:
+++
outputs = ["Reveal"]
+++
# Slide 1
Hello world!
Add slides in same file
Separate them by ---:
# Slide 1
Hello world!
---
# Slide 2
Hello program!
Add slides with other files
Add slides to content/home/*.md
+++
weight = 10
+++
# Slide 3
---
# Slide 4
💡 Tip: Use weight to specify the order that files should be added.
Presentation at '/{section}/'
In content/{section}/_index.md:
+++
outputs = ["Reveal"]
+++
# Slide 1
---
# Slide 2
Add slides from other files in content/{section}/*.md
+++
weight = 10
+++
# Slide 3
---
# Slide 4
💡 Tip: Use weight to specify the order that files should be added.
Configuration
Reveal.js themes
Put in config.toml or a presentation's front matter.
Use the theme key for themes that come with Reveal.js.
[params.reveal_hugo]
theme = "moon"
highlight_theme = "zenburn"
Reveal.js themes · highlight.js themes
Use a custom theme
Use the custom_theme key to point to a CSS file in the static directory.
[params.reveal_hugo]
custom_theme = "reveal-hugo/themes/robot-lung.css"
Like this theme?
reveal-hugo comes with 2 extra Reveal.js themes:
- robot-lung (this one)
- sunblind
They live in the `static/reveal-hugo/themes` folder and also [on Github](https://github.com/dzello/revealjs-themes).
Reveal.js params
Set snakecase versions of Reveal.js params, which will be camelized and passed to Reveal.initialize.
[params.reveal_hugo]
history = true
slide_number = true
transition = 'zoom'
transition_speed = 'fast'