Commit 8d2a6ad9 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Be more flexible on how the stylesheet is added

parent bb163dae
......@@ -11,11 +11,15 @@ from distutils.version import LooseVersion
# -- General configuration ------------------------------------------------
def setup(app):
"""Called automatically by Sphinx when starting the build process
"""
app.add_css_file("custom.css")
if LooseVersion(sphinx_version) > LooseVersion("1.6"):
def setup(app):
"""Called automatically by Sphinx when starting the build process
"""
if hasattr(app, 'add_css_file'): # >=v1.8
app.add_css_file("custom.css")
else:
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
......
Supports Markdown
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