Skip to content
Snippets Groups Projects
Unverified Commit c29da12e authored by Savici, Andrei T.'s avatar Savici, Andrei T. Committed by GitHub
Browse files

Merge pull request #23100 from martyngigg/sphinx-161

Fix custom user docs stylesheet for Sphinx > 1.6
parents cb611a6a 8a4f3f48
No related branches found
No related tags found
No related merge requests found
...@@ -49,4 +49,7 @@ ...@@ -49,4 +49,7 @@
{%- endblock %} {%- endblock %}
{# Custom CSS overrides #} {# 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'] %} {% set bootswatch_css_custom = ['_static/custom.css'] %}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import sys import sys
import os import os
from sphinx import __version__ as sphinx_version
import sphinx_bootstrap_theme # checked at cmake time import sphinx_bootstrap_theme # checked at cmake time
import mantid import mantid
from mantid import ConfigService from mantid import ConfigService
...@@ -16,6 +17,13 @@ sys.path.insert(0, os.path.abspath(os.path.join('..', 'sphinxext'))) ...@@ -16,6 +17,13 @@ sys.path.insert(0, os.path.abspath(os.path.join('..', 'sphinxext')))
# -- General configuration ------------------------------------------------ # -- 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 # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
...@@ -139,9 +147,12 @@ html_static_path = ['_static'] ...@@ -139,9 +147,12 @@ html_static_path = ['_static']
# directly to the root of the documentation. # directly to the root of the documentation.
#html_extra_path = [] #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. # 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. # Hide the Sphinx usage as we reference it on github instead.
html_show_sphinx = False 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