diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 475ea97..293d5d1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -18,6 +18,9 @@ sphinx: # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -# python: -# install: -# - requirements: docs/requirements.txt +python: + install: + - requirements: requirements_dev.txt + + + diff --git a/docs/conf.py b/docs/conf.py index c086d4e..1b002d5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,11 +17,10 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os # import sys # sys.path.insert(0, os.path.abspath('.')) -import sphinx_rtd_theme # -- General configuration ------------------------------------------------ @@ -130,7 +129,7 @@ # a list of builtin themes. # # html_theme = 'alabaster' -html_theme = "sphinx_rtd_theme" +html_theme = "odsc_default_sphinx_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 @@ -140,7 +139,6 @@ # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. # " v documentation" by default. @@ -347,3 +345,13 @@ # If true, do not generate a @detailmenu in the "Top" node's menu. # # texinfo_no_detailmenu = False + + +# -- Readthedocs ------------------------------------------- + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True + diff --git a/requirements_dev.txt b/requirements_dev.txt index 0224aa6..09971ea 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -4,8 +4,8 @@ pytest pytest-cov coveralls pytest-localserver -sphinx -sphinx_rtd_theme +sphinx>=7.4 +odsc-default-sphinx-theme isort flake8<6 black==22.3.0