themen-hugo-35c3-reveal/exampleSite/content/home/usage.md

137 lines
1.5 KiB
Markdown
Raw Normal View History

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
```
---
## Configure themes
2018-05-16 04:15:36 +02:00
Optional. In `config.toml` or front matter of individual presentations.
```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/)
---
## Custom Reveal.js theme
Point to a file in the `static` directory.
```toml
[params.reveal_hugo]
custom_theme = "themes/dzello.css"
```
---
## 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`.
```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
```
Use `weight` to specify the order relative to other files.
2018-04-30 20:04:48 +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
```
Use `weight` to specify the order relative to other files.