diff --git a/archetypes/slides.md b/archetypes/slides.md deleted file mode 100644 index 02880bb2..00000000 --- a/archetypes/slides.md +++ /dev/null @@ -1,15 +0,0 @@ -+++ -title = "{{ replace .Name "-" " " | title }}" - -[slides] -# Choose a theme from https://github.com/hakimel/reveal.js#theming -theme = "black" -+++ - -# Title - -Author Name - ---- - -## Slide 2 diff --git a/archetypes/slides/index.md b/archetypes/slides/index.md new file mode 100644 index 00000000..f89e1405 --- /dev/null +++ b/archetypes/slides/index.md @@ -0,0 +1,29 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} + +# Add a summary (optional). +summary = "" + +# Authors, tags, and categories +# Use a comma separated list, e.g. `["Bob Smith", "David Jones"]`. +authors = [] +tags = [] +categories = [] + +[slides] + # Choose a theme from https://github.com/hakimel/reveal.js#theming + theme = "black" + + # Choose a code highlighting style (if highlighting enabled in `params.toml`) + # Light style: github. Dark style: dracula (default). + highlight_style = "dracula" ++++ + +# Title + +Author Name + +--- + +## Slide 2 diff --git a/exampleSite/content/slides/example/index.md b/exampleSite/content/slides/example/index.md index 9de1d3f8..ca849de7 100644 --- a/exampleSite/content/slides/example/index.md +++ b/exampleSite/content/slides/example/index.md @@ -1,9 +1,21 @@ +++ title = "Slides" +date = 2019-02-05T00:00:00Z +summary = "An introduction to using Academic's Slides feature." + +# Authors, tags, and categories +# Use a comma separated list, e.g. `["Bob Smith", "David Jones"]`. +authors = [] +tags = [] +categories = [] [slides] -# Choose a theme from https://github.com/hakimel/reveal.js#theming -theme = "black" + # Choose a theme from https://github.com/hakimel/reveal.js#theming + theme = "black" + + # Choose a code highlighting style (if highlighting enabled in `params.toml`) + # Light style: github. Dark style: dracula (default). + # highlight_style = "dracula" # Uncomment this line to set a style. +++ # Welcome to Slides diff --git a/layouts/slides/baseof.html b/layouts/slides/baseof.html index 63ccd28e..91f81e85 100644 --- a/layouts/slides/baseof.html +++ b/layouts/slides/baseof.html @@ -21,7 +21,8 @@ {{- $theme := $.Param "slides.theme" | default "black" -}} - {{ printf "" (printf $css.highlight.url $css.highlight.version "dracula") | safeHTML }} + {{- $highlight_style := $.Param "slides.highlight_style" | default "dracula" -}} + {{ printf "" (printf $css.highlight.url $css.highlight.version $highlight_style) | safeHTML }} {{ $css := resources.Get "css/reveal.css" }} {{ $css_custom := resources.Get "css/reveal_custom.css" }}