Configurations ¶
sphinx-revealjs
can build multiple presentations.
You can configure in
conf.py
for all presentations.
Basic configurations ¶
- revealjs_static_path ¶
-
- Type
-
list
- Default
-
[]
(empty) - Example
-
["_static"]
List of static files directory ( same as
html_static_path
)
- revealjs_js_files ¶
-
- Type
-
list
- Default
-
[]
(empty) - Example
-
["custom.js"]
List of using custom css (same as
html_js_files
).When you want to use JS that does not related revealjs, can use this.
- revealjs_css_files ¶
-
- Type
-
list
- Default
-
[]
(empty) - Example
-
["custom.css"]
List of using custom css (same as
html_css_files
).If you want to customize presentation by CSS, write external css and use it.
- revealjs_use_index ¶
-
- Type
-
bool
- Default
-
False
Flag that does builder generate
genindex.html
(same ashtml_use_index
).
- revealjs_html_theme ¶
-
- Type
-
str
- Default
-
revealjs-basic
- Example
-
revealjs-simple
Using HTML Theme for output contents. It can set any html theme, but it should set theme made for revealjs.
Bundled themes are:
-
revealjs-basic
: Inherit style from basic html theme. -
revealjs-simple
: Minimal defined style.
Style Configurations ¶
- revealjs_style_theme ¶
-
- Type
-
str
- Default
-
black
- Example
-
moon
,custom.css
Theme name of stylesheet for Reveal.js.
-
If value does not have suffix
.css
,use bundled Reveal.js theme(includedrevealjs/css/theme
).
Presentation Configurations ¶
- revealjs_use_section_ids ¶
-
- Type
-
boolean
- Default
-
False
If this is set
True
, injectid
attribute intosection
element (parent of headerings). This means that change format of internal links (default is numbering style).
- revealjs_script_files ¶
-
- Type
-
List[str]
- Default
-
[]
- Example
-
["presentation.js"]
List of sources that render as
script
tags.There is bundled Reveal.js script at
revealjs/js/reveal.js
.Example:
<div> <!-- Presentation body --> </div> <!-- here!! --> <script src="_static/revealjs/js/revealjs.js"></script> <script src="_static/presentation.js"></script>
- revealjs_script_conf ¶
-
- Type
-
str or dict
- Default
-
None
Configuration of Reveal.js presentation. This value is used as options of
Reveal.initialize
in output files.-
If value is string type, handle as raw javascript code.
-
If value is dict object, convert to json string at internal.
Note
For behavior compatibility, it appends
{"scrollActivationWidth": None}
as default configuration when value is dict object or is not set.See it: https://github.com/hakimel/reveal.js/releases/tag/5.0.0
Example 1: case of str
revealjs_script_conf = """ { controls: false, transition: 'zoom', } """
<div> <!-- Presentation body --> </div> <script src="_static/revealjs/js/revealjs.js"></script> <!-- here!! --> <script> let revealjsConfig = {}; revealjsConfig = Object.assign(revealjsConfig, { controls: false, transition: 'zoom', }); revealjs.initialize(revealjsConfig); </script>
Example 2: case of dict
revealjs_script_conf = { "controls": False, "transition": "zoom", }
<div> <!-- Presentation body --> </div> <script src="_static/revealjs/js/revealjs.js"></script> <!-- here!! --> <script> let revealjsConfig = {}; revealjsConfig = Object.assign(revealjsConfig, JSON.parse('{"controls": false, "transition": "zoom", "scrollActivationWidth": null}')); revealjs.initialize(revealjsConfig); </script>
example 1 and 2 are behaving same.
- revealjs_script_plugins ¶
-
- Type
-
List[Dict]
- Default
-
[]
List of plugin configurations. If this value is set, render
script
tag after source script tags.There are bundled Reveal.js plugins at
revealjs/plugin
.Example:
revealjs_script_plugins = [ { "src": "revealjs/plugin/highlight/highlight.js", "name": "RevealHighlight", }, ]
<div> <!-- Presentation body --> </div> <script src="_static/revealjs/js/revealjs.js"></script> <script src="_static/revealjs/plugin/highlight/highlight.js"></script> <!-- here!! --> <script> let revealjsConfig = {}; revealjsConfig.plugins = [RevealHighlight,]; revealjs.initialize(revealjsConfig); </script>
- revealjs_notes_from_comments ¶
-
- Type
-
boolean
- Default
-
False
If this is set True , builder writes notes section from comment block.