Skip to content

Commit

Permalink
Allow options as both list-of-strings or mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
pganssle committed Jul 10, 2018
1 parent 0569194 commit 882c5f3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions _layouts/reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@
transition: '{{ site.reveal_transition }}', // default/cube/page/concave/zoom/linear/fade/none

{% if site.reveal_options %}
{% for option in site.reveal_options %}
{{ option[0] }}: "{{ option[1] }}",
{% endfor %}

{% if site.reveal_options.first.first %}
// Reveal options generated from mapping
{% for option in site.reveal_options %}
{{ option[0] }}: "{{ option[1] }}",
{% endfor %}
{% else %}
// Reveal options generated from a list of strings
{{ site.reveal_options | append:',' }}
{% endif %}
{% endif %}
// Optional libraries used to extend on reveal.js
Expand Down

0 comments on commit 882c5f3

Please sign in to comment.