nbconvert
nbconvert copied to clipboard
Is there a simple way to customize Reveal.initialize arguments?
I would need to change values of Reveal.initialize
arguments (see https://revealjs.com/presentation-size/). Is there a simple way to do that? I would like to avoid writing a custom exporter for that.
Inside reveal.js there is a chunk of code that exposes configuration options:
// Compose our config object in order of increasing precedence:
// 1. Default reveal.js options
// 2. Options provided via Reveal.configure() prior to
// initialization
// 3. Options passed to the Reveal constructor
// 4. Options passed to Reveal.initialize
// 5. Query params
config = { ...defaultConfig, ...config, ...options, ...initOptions, ...Util.getQueryHash() };
So the query string ( remove #
at end of url and add ?config_option=value ) is used to set configuration options first and whatever is not set, gets set by initOptions ( Reveal.initialize()
) and whatever is not set by initOptions is set by the arguments of the Reveal constructor and so on.
So to answer your question, the only way that I think might be simpler is to put your settings in the url.
For example: ..yourslides.html?embedded=false&width=600&height=700&margin=0.04&minScale=0.4&maxScale=1.0#/
Thank you for this! This helped me tremendously
Is there also a way to have this set in the standalone HTML file?