Salome HOME
bos #18858 Use sphinx_rtd_theme as theme for SALOME documentation built with Sphinx
[modules/smesh.git] / doc / salome / gui / SMESH / conf.py.in
index d11dbd5c4bc1ac85e2813c3136f568d498f2c354..66efe32d3c7318abd5d6c5c736683895d4b1e8e6 100644 (file)
@@ -30,7 +30,12 @@ try:
   extensions += ['sphinxcontrib.napoleon']
 except:
   pass
-
+try:
+  import sphinx_rtd_theme
+  extensions += ['sphinx_rtd_theme']
+  use_rtd_theme = True
+except:
+  use_rtd_theme = False
 #add pdfbuilder to build a pdf with rst2pdf
 #extensions = ['rst2pdf.pdfbuilder']
 
@@ -106,7 +111,11 @@ pygments_style = 'sphinx'
 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic'
+if use_rtd_theme:
+  html_theme = 'sphinx_rtd_theme'
+else:
+  html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic'
+
 themes_options = {}
 themes_options['classic'] = {
   'body_max_width':'none',