marianoguerra / rst2html5

transform restructuredtext documents to html5 + twitter's bootstrap css, deck.js or reveal.js
http://marianoguerra.github.com/rst2html5
MIT License
177 stars 51 forks source link

--reveal-js-opts ignored except theme #40

Open faassen opened 10 years ago

faassen commented 10 years ago

The documentation says --reveal-js-opts are passed to the post processor, in this case the reveal.js post processor. I expected that this could be used to pass options into the Reveal.initialize() function. Except for theme they are however ignored; I can't find code that would generate this either - it always creates a fixed initialize().

Perhaps I don't understand the documentation correctly?

marianoguerra commented 10 years ago

the opts are not passed to initialize, but to the postprocessor in python, which only understands theme:

https://github.com/marianoguerra/rst2html5/blob/master/html5css3/postprocessors.py#L116

what other option you want to pass in? maybe I can pass the whole params to initialize as json, but that may cause a problem, what do you think?

faassen commented 10 years ago

From reading the docs I get the impression that the opts would be passed to reveal.js (as theme seems to be, though it's a different mechanism).

Dumping the remaining params as json is just what I did in my pull request. I myself wanted to turn off the controls, but there are a lot of other possibilities, such as setting the presentation size. See here:

https://github.com/hakimel/reveal.js/#configuration

and here:

https://github.com/hakimel/reveal.js/#presentation-size

(among other options)