Salome HOME
Copyright update 2020
[tools/documentation.git] / dev / cmake / source / conf.py.in
index 89db943dd3223021036cedc5726e8869f625cd10..b8a5321db990288bfc90139aa90e8f9e948e71b0 100644 (file)
@@ -12,6 +12,7 @@
 # serve to show the default.
 
 import sys, os
+import sphinx
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -26,6 +27,12 @@ import sys, os
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = []
+try:
+  import sphinx_rtd_theme
+  extensions += ['sphinx_rtd_theme']
+  use_rtd_theme = True
+except:
+  use_rtd_theme = False
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -41,7 +48,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'CMake build procedure'
-copyright = u'2013-2017, Adrien Bruneton (CEA), Anthony Geay (CEA), Nicolas Geimer (EDF), Paul Rascle (EDF)'
+copyright = u'2013-2020, Adrien Bruneton (CEA), Anthony Geay (CEA), Nicolas Geimer (EDF), Paul Rascle (EDF)'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -91,7 +98,17 @@ pygments_style = 'sphinx'
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = '@SPHINX_THEME@'
+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',
+  'body_min_width':0,
+}
+html_theme_options = themes_options.get(html_theme, {})
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the