Commits

hiteiteki committed 5762af0

Theme loading bug fix.

  • Participants
  • Parent commits f503cfa

Comments (0)

Files changed (1)

File docs/conf.py

 # serve to show the default.
 
 import imp, inspect, sys, os
-from sphinx.writers.html import HTMLWriter
-
-# Rewriting initial header setting from h1 to h2 for html
-HTMLWriter.settings_spec[2][6][2]['default'] = 2
 
 
 class Mock(object):
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
 if os.environ.get('SPHINX_HTML_THEME', None) == 'orange_web_theme':
+    from sphinx.writers.html import HTMLWriter
+    # Rewriting initial header setting from h1 to h2 for html
+    HTMLWriter.settings_spec[2][6][2]['default'] = 2
     html_theme = os.environ['SPHINX_HTML_THEME']
 else:
     html_theme = 'orange_theme'