Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ def copy_legacy_redirects(app, docname): # Sphinx expects two arguments
os.makedirs(os.path.dirname(target_path))
with open(target_path, "w") as f:
f.write(html)

def fix_epub_generation(app):
# Ensure there's an epub handler
if "html" in app.registry.translation_handlers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing :?

app.registry.translation_handlers["epub"] = app.registry.translation_handlers["html"]

def setup(app):
app.connect('build-finished', copy_legacy_redirects)
fix_epub_generation(app)