From ad823cc4d72edbab10f0dadf99b30df91c3f7c50 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 16 Aug 2020 08:38:04 +0300 Subject: Squashed 'website/themes/reveal-hugo/' content from commit ff9f389 git-subtree-dir: website/themes/reveal-hugo git-subtree-split: ff9f389743ae2fe5c5cc6101455db0616e8548e2 --- exampleSite/content/home/configuration.md | 170 ++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 exampleSite/content/home/configuration.md (limited to 'exampleSite/content/home/configuration.md') diff --git a/exampleSite/content/home/configuration.md b/exampleSite/content/home/configuration.md new file mode 100644 index 0000000..1d13e9b --- /dev/null +++ b/exampleSite/content/home/configuration.md @@ -0,0 +1,170 @@ ++++ +weight = 21 ++++ + +# Configuration + +Place configuration values in `config.toml` or a presentation's front matter (`_index.md`). + +--- + +## Reveal.js themes + +Themes control the look and feel of your presentation. Set the `theme` param to any [valid Reveal.js theme](https://github.com/hakimel/reveal.js/#theming). + +```toml +[params.reveal_hugo] +theme = "moon" +``` + +--- + +## Use a custom theme + +To use a custom Reveal.js theme, place the CSS file in the `static` directory and set the `custom_theme` param. + +```toml +[params.reveal_hugo] +custom_theme = "reveal-hugo/themes/robot-lung.css" +``` + +--- + +### Use a custom theme (advanced) + +To use Hugo pipes to build a custom Reveal.js theme, place the source file (SCSS / PostCSS) in the `assets` directory and set the `custom_theme_compile` param. + +```toml +[params.reveal_hugo] +custom_theme = "reveal-hugo/themes/custom-theme.scss" +custom_theme_compile = true +``` + + + +💡 See the [custom theme example presentation](/custom-theme-example/) for more details. + + + +--- + +## Bundled themes + +reveal-hugo comes with 2 extra Reveal.js themes: + +- [robot-lung](https://github.com/dzello/revealjs-themes#robot-lung) (this one) +- [sunblind](https://github.com/dzello/revealjs-themes#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`. + +```toml +[params.reveal_hugo] +history = true +slide_number = true +transition = 'zoom' +transition_speed = 'fast' +``` + +[Full list of params](https://github.com/hakimel/reveal.js/#configuration) + +--- + +## highlight.js themes + +To change the syntax highlighting theme, set the `highlight_theme` +to a valid [highlight.js theme name](https://highlightjs.org/static/demo/). + +```toml +[params.reveal_hugo] +highlight_theme = "zenburn" +``` + +--- + +## Extending the layout + +Use partials to add HTML to the page for one or all presentations at a time. + + +💡 This is the recommended way to add script and style tags to customize your presentations. + + +--- + +Here is where to put partials for different presentations and places in the DOM. +

+ +| Presentation | Before </head> | Before </body> | +|--------------|---------------------------------|---------------------------------| +| All | reveal-hugo/head.html | reveal-hugo/body.html | +| Root | home/reveal-hugo/head.html | home/reveal-hugo/body.html | +| Section | {section}/reveal-hugo/head.html | {section}/reveal-hugo/body.html | + +  + + + +💡 You can also create an `end.html` to put content before the end of the `.reveal` div tag. + + + +--- + +## Custom CSS Example + +In `home/reveal-hugo/head.html`: + +```html + +``` + +--- + +## Custom JS Example + +In `home/reveal-hugo/body.html`: + +```html + +``` + +--- + +### Extending the layout +#### (alternative) + +You can declare a custom CSS or javascript in your configuration. + +```toml +[reveal_hugo] +custom_css = "css/custom.css" +custom_js = "js/custom.js" +``` + + + +These files can be located in `static/css`, `static/js` folder + +💡 See the [extending layout example](/extending-layout-example/#) for more details. + + -- cgit v1.3.1-26-gb76a