mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-07 14:03:33 +02:00
Add layout and example for leaf bundles; addresses #27
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
+++
|
||||||
|
+++
|
||||||
|
|
||||||
|
If more markdown files are present in the bundle, their contents will be added to the presentation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Specify `weight` in the frontmatter if it's necessary to order them.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
If you don't want them to be included, specify `layout = "list"` in the front matter instead of `layout = "bundle"`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## THE END
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
+++
|
||||||
|
title = "Bundle example presentation"
|
||||||
|
outputs = ["Reveal"]
|
||||||
|
layout = "bundle"
|
||||||
|
[reveal_hugo]
|
||||||
|
theme = "night"
|
||||||
|
margin = 0.2
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Page Bundles
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[Hugo page bundles](https://gohugo.io/content-management/page-bundles/) are a useful way to organize content.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
To create a reveal-hugo presentation from the `index.md` file of a leaf page bundle, you need to specify the layout manually.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
layout = "bundle"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Why? By default, reveal-hugo doesn't create pages for single template types (foo.md), only for list template types (_index.md).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This technique can also be used to output an HTML file for any section of a presentation, should you need to.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ partial "reveal-hugo/slides" (slice .Page) }}
|
||||||
|
{{ partial "reveal-hugo/slides" (.Resources.ByType "page") }}
|
||||||
|
{{ end }}
|
||||||
Reference in New Issue
Block a user