diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index 81c75a3d306762706c42f27765f4581ad5b4b3e9..791b7cb30cc07c6d8321d0c64ab00b89ebef1bd9 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -49,4 +49,7 @@ {%- endblock %} {# Custom CSS overrides #} +<!-- Overriding style sheets changed in Sphinx >=1.6.1: https://github.com/ryan-roemer/sphinx-bootstrap-theme/blob/master/README.rst#adding-custom-css + Later versions of sphinx-theme-bootstrap-theme ignore this value but we keep it so that old versions still work + --> {% set bootswatch_css_custom = ['_static/custom.css'] %} diff --git a/docs/source/conf.py b/docs/source/conf.py index 34096bd1c63377235fade1069c361f94b0b09dbb..be1eb1ab003c88b22776e7b869cb4eefbb3a18c4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,6 +5,7 @@ import sys import os +from sphinx import __version__ as sphinx_version import sphinx_bootstrap_theme # checked at cmake time import mantid from mantid import ConfigService @@ -16,6 +17,13 @@ sys.path.insert(0, os.path.abspath(os.path.join('..', 'sphinxext'))) # -- General configuration ------------------------------------------------ +if sphinx_version > "1.6": + def setup(app): + """Called automatically by Sphinx when starting the build process + """ + app.add_stylesheet("custom.css") + + # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. @@ -139,9 +147,12 @@ html_static_path = ['_static'] # directly to the root of the documentation. #html_extra_path = [] -# If true, SmartyPants will be used to convert quotes and dashes to +# If true, Smart Quotes will be used to convert quotes and dashes to # typographically correct entities. -html_use_smartypants = True +if sphinx_version < "1.7": + html_use_smartypants = True +else: + smartquotes = True # Hide the Sphinx usage as we reference it on github instead. html_show_sphinx = False