Permalink
Browse files

Retain compatibility with Sphinx<1.6

  • Loading branch information...
bitprophet committed Sep 18, 2017
1 parent 864a26e commit a902b04a0ea672dde84070e3309ec759dba4020c
Showing with 4 additions and 1 deletion.
  1. +4 −1 alabaster/__init__.py
View
@@ -15,7 +15,10 @@ def update_context(app, pagename, templatename, context, doctree):
context['alabaster_version'] = version.__version__
def setup(app):
app.add_html_theme('alabaster', os.path.abspath(os.path.dirname(__file__)))
# add_html_theme is new in Sphinx 1.6+
if hasattr(app, 'add_html_theme'):
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme('alabaster', theme_path)
app.connect('html-page-context', update_context)
return {'version': version.__version__,
'parallel_read_safe': True}

0 comments on commit a902b04

Please sign in to comment.