Skip to content

Commit

Permalink
Update docs config
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Nov 6, 2024
1 parent eec946f commit 26c0624
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions conda_package/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# serve to show the default.

import os
from datetime import date

import mpas_tools

# -- General configuration ------------------------------------------------
Expand All @@ -24,7 +26,9 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
extensions = ['sphinx_rtd_theme',
'sphinx_multiversion',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
Expand Down Expand Up @@ -55,14 +59,14 @@
master_doc = 'index'

# General information about the project.
project = u'mpas_tools'
copyright = u'This software is open source software available under the BSD-3' \
u'license. Copyright (c) 2019 Triad National Security, LLC. ' \
u'All rights reserved. Copyright (c) 2019 Lawrence Livermore ' \
u'National Security, LLC. All rights reserved. Copyright (c) ' \
u'2019 UT-Battelle, LLC. All rights reserved.'
author = u'Xylar Asay-Davis, Doug Jacobsen, Michael Duda, Mark Petersen, ' \
u'Matt Hoffman, Adridan Turner, Philip Wolfram'
project = 'mpas_tools'
year = date.today().year
copyright = f'This software is open source software available under the BSD-3' \
f'license. Copyright (c) {year} Triad National Security, LLC. ' \
f'All rights reserved. Copyright (c) {year} Lawrence Livermore ' \
f'National Security, LLC. All rights reserved. Copyright (c) ' \
f'{year} UT-Battelle, LLC. All rights reserved.'
author = 'MPAS-Tools development team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -102,14 +106,7 @@
# a list of builtin themes.
#

# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
# docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
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
Expand Down Expand Up @@ -185,6 +182,23 @@
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'xarray': ('http://xarray.pydata.org/en/stable/', None),
'geometric_features':
('http://mpas-dev.github.io/geometric_features/stable/', None)}
('http://mpas-dev.github.io/geometric_features/main/', None)}

github_doc_root = 'https://github.com/rtfd/recommonmark/tree/master/doc/'

# 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_sidebars = {
"**": [
"versions.html",
],
}

# -- Options sphinx-multiversion -------------------------------------------
# Include tags like "tags/1.0.0" -- 0.0.1, 0.0.10 don't build
smv_tag_whitelist = r'^(?!(0.0.1|0.0.10))\d+\.\d+.\d+$'
smv_branch_whitelist = 'master'
smv_remote_whitelist = 'origin'

0 comments on commit 26c0624

Please sign in to comment.