Skip to content

Commit

Permalink
Merge pull request #63 from stsewd/exclude-extra-header-from-offline-…
Browse files Browse the repository at this point in the history
…builders

Exclude extra header from offline builders
  • Loading branch information
ericholscher authored Jul 16, 2019
2 parents f3d3d33 + 1d925ba commit ab5a7aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion readthedocs_ext/readthedocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def update_body(app, pagename, templatename, context, doctree):
# This is monkey patched on the signal because we can't know what the user
# has done with their `app.builder.templates` before now.

if not hasattr(app.builder.templates.render, '_patched'):
if (
app.builder.name in online_builders and not
hasattr(app.builder.templates.render, '_patched')
):
# Janky monkey patch of template rendering to add our content
old_render = app.builder.templates.render

Expand Down

0 comments on commit ab5a7aa

Please sign in to comment.