Skip to content

Commit

Permalink
Use the SunPy documentation theme if it's installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Dec 6, 2017
1 parent 18f14bc commit 7eca1af
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions doc/conf.py
Expand Up @@ -12,7 +12,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.1'
needs_sphinx = '1.3'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -22,14 +22,12 @@
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'numpydoc'
'sphinx.ext.napoleon'
]

# Generate API docs.
autosummary_generate = ['api.rst']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand Down Expand Up @@ -123,7 +121,25 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'drmsdoc'

try:
from sunpy_sphinx_theme.conf import *

# Custom sidebar templates, maps document names to template names.
html_sidebars = {'**': ['docsidebar.html']}

except ImportError:

html_theme = 'drmsdoc'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_themes']
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

#html_theme = 'classic'
#html_theme = 'sphinxdoc'
#html_theme = 'sphinx_rtd_theme'
Expand All @@ -133,9 +149,6 @@
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_themes']

# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#html_title = 'drms v0.5.0'
Expand All @@ -152,10 +165,6 @@
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -301,3 +310,4 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

0 comments on commit 7eca1af

Please sign in to comment.