Skip to content
Snippets Groups Projects
Commit 8a4f3f48 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Fix custom user docs stylesheet for Sphinx > 1.6

parent c9f8ff74
No related branches found
No related tags found
No related merge requests found
......@@ -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'] %}
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment