Commit 3ff1fa34 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Be more flexible on how the stylesheet is added

parent a537c7f7
......@@ -11,17 +11,15 @@ from distutils.version import LooseVersion
# -- General configuration ------------------------------------------------
if LooseVersion(sphinx_version) > LooseVersion("1.6"):
def setup(app):
"""Called automatically by Sphinx when starting the build process
"""
# Add support for multiple Sphinx versions
if hasattr(app, "add_css_file"):
if hasattr(app, 'add_css_file'): # >=v1.8
app.add_css_file("custom.css")
else:
app.add_stylesheet("custom.css")
app.add_stylesheet("custom.css") # v1.6-1.8
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment