From b0ce0fb1b4f07585bbad01aaf9439778452336fa Mon Sep 17 00:00:00 2001 From: Ryan May Date: Thu, 7 Nov 2024 15:09:48 -0700 Subject: [PATCH] DOC: Clean up some sphinx config Elminates a warning and uses basic config options to add CSS rather than an app hook. --- docs/conf.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1c772726c..4c119396f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 @@ -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