This is an introduction to serve reveal.js slide to Read the docs.
conf.py to override target builder.
def override_builder(app, config): # Change for your RTD settings. Please set it in your RTD prject app.registry.builders["singlehtml"] = app.registry.builders["revealjs"] def setup(app): app.connect("config-inited", override_builder)
You can see contents and sources.
Read the docs are documentation platform supporting Sphinx.
You can serve HTML files from Sphinx documentation as same as run
make html on local.
sphinx-revealjs is Sphinx extension to provide builder that generate Reveal.js style HTML. (ex: call
RTD supports only
singlehtml for HTML buildings.
So, it is difficult to server reveal.js presentation of sphinx-revealjs.
Sphinx provides Application API to inject procedures on some events.
config-inited event is called on after loading all configuration before creating target-builder object.
We can modify builder-class in the handler for this event, and can use any builder in RTD.
(please see abstract for example)
This hack switches the builder, and you cannot use regular builder.
You should be careful what builder you want to call.
RTD provides widget for versioning and i18n.
But reveal.js content does not render wighet.
You can serve single version presentation only!
This is dirty hack.
RTD may not accept this hack in backend.