diff --git a/README.md b/README.md index 16eb194..302731a 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ The Usage guide is contained in the example presentation that lives in this repo Customize the Reveal.js presentation by setting these values in `config.toml` or the front matter of any presentation's `index.md` file. - `params.reveal_hugo.theme`: The Reveal.js theme used, defaults to "black" +- `params.reveal_hugo.highlight_theme`: The [highlight.js](https://highlightjs.org/) theme used, defaults to "default" Include any other attributes in `params.reveal_hugo` that you'd like to be fed as arguments to `Reveal.initialize`. See the [extensive list of Reveal.js configuration options](https://github.com/hakimel/reveal.js/#configuration) here. The defaults used by this theme are located in `data/reveal_hugo.toml`. @@ -143,10 +144,10 @@ If your Hugo site already has a theme but you'd like to create a presentation fr ```shell $ cd my-hugo-site $ git clone git@github.com:dzello/reveal-hugo.git themes/reveal-hugo -$ cp -r themes/reveal-hugo/static/reveal static/reveal $ cp -r themes/reveal-hugo/static/reveal_hugo static/reveal_hugo $ cp themes/reveal-hugo/layouts/* layouts $ cp themes/reveal-hugo/data/* data +$ cp themes/reveal-hugo/static/* static ``` Files and directories are named such that they shouldn't conflict with your existing content. Of course, you should double check before copying, especially the shortcodes which can't be put under a directory. diff --git a/data/reveal_hugo.toml b/data/reveal_hugo.toml index eac6036..973cc27 100644 --- a/data/reveal_hugo.toml +++ b/data/reveal_hugo.toml @@ -1,5 +1,6 @@ [defaults] theme = 'black' +highlight_theme = 'default' controls = true progress = true history = true diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 7cfade9..a8fe8db 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,10 +7,7 @@ disableKinds = ["sitemap", "RSS"] name = "Josh Dzielak" [params] -description = "A description of this presentation" - -[params.reveal_hugo] -theme = "solarized" +description = "Includes a handy markdown-based syntax and shortcodes to help you get presentations done fast" [outputFormats.Reveal] baseName = "index" diff --git a/exampleSite/content/example/_index.md b/exampleSite/content/example/_index.md index c5eacc8..91a81a7 100644 --- a/exampleSite/content/example/_index.md +++ b/exampleSite/content/example/_index.md @@ -3,7 +3,6 @@ title = "Example of a section presentation" outputs = ["Reveal"] [reveal_hugo] theme = "moon" -slideNumber = true +++ # Section Presentation diff --git a/layouts/_default/baseof.reveal.html b/layouts/_default/baseof.reveal.html index 419a9f5..fbacff4 100644 --- a/layouts/_default/baseof.reveal.html +++ b/layouts/_default/baseof.reveal.html @@ -1,4 +1,6 @@ +{{- $reveal_cdn := "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" -}} +{{- $highlight_cdn := "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" -}}
@@ -8,21 +10,23 @@ - - {{ $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.theme "black" }} - + + + {{ $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.defaults.theme "black" }} + - + {{ $highlight_theme := or .Page.Params.reveal_hugo.highlight_theme .Site.Params.reveal_hugo.highlight_theme .Site.Data.reveal_hugo.defaults.highlight_theme "default" }} + {{ partial "reveal-hugo/head" . }} @@ -34,18 +38,26 @@ - - - + + + {{ partial "reveal-hugo/body" . }}