Skip to content

Commit

Permalink
DOC: Clean up some sphinx config
Browse files Browse the repository at this point in the history
Elminates a warning and uses basic config options to add CSS rather than
an app hook.
  • Loading branch information
dopplershift committed Nov 7, 2024
1 parent 3390ac1 commit b0ce0fb
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,12 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'default'
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
pass

def setup(app):
app.add_css_file('theme_override.css')
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {'canonical_url': 'https://unidata.github.io/siphon/latest/'}
if 'sphinx_rtd_theme' in vars() and sphinx_rtd_theme.__version__ == '0.2.5b1.post1':
html_theme_options['versions'] = {'latest': '../latest', 'dev': '../dev'}

# Extra variables that will be available to the templates. Used to create the
# links to the Github repository sources and issues
Expand Down Expand Up @@ -186,6 +175,7 @@ def setup(app):
# 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_css_files = ['theme_override.css']

# 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

0 comments on commit b0ce0fb

Please sign in to comment.