Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aslgraefe committed Sep 30, 2024
1 parent a524d21 commit 2c73fbf
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import sys

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html


# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

Expand All @@ -19,6 +17,10 @@
author = 'Adam SL Graefe'
release = '2.0.0'

# -- Detect Read the Docs build environment -----------------------------------
# If the environment variable READTHEDOCS is set, we're building on Read the Docs
on_rtd = os.environ.get('READTHEDOCS') == 'True'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

Expand All @@ -35,10 +37,23 @@

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_static_path = ['_static']
html_extra_path = ['../res']

pygments_style = 'sphinx'
# -- Static path configuration ------------------------------------------------
# If on Read the Docs, make sure that static files are correctly located
if on_rtd:
# Set the output to the specific path that Read the Docs expects
html_static_path = ['_static']
else:
html_static_path = ['_static']

# -- Output directory configuration -------------------------------------------
# In case you need to set specific paths for Read the Docs
if on_rtd:
# Use the environment variable provided by Read the Docs
html_output_dir = os.environ.get('READTHEDOCS_OUTPUT', '_build/html')
else:
# Local builds will use the default Sphinx output directory
html_output_dir = '_build/html'

# -- Autodoc setup ------------------------------------------------------------

Expand All @@ -49,7 +64,7 @@
doctest_path = [src_path]
doctest_test_doctest_blocks = ""

# code to be executed before each doctest block
# Code to be executed before each doctest block
doctest_global_setup = """
import numpy as np
"""
Expand All @@ -59,7 +74,6 @@
| doctest.IGNORE_EXCEPTION_DETAIL
| doctest.DONT_ACCEPT_TRUE_FOR_1)


# -- Intersphinx setup --------------------------------------------------------
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand All @@ -74,5 +88,4 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme' # experiment with this
html_static_path = ['_static']
html_theme = 'sphinx_rtd_theme' # Using the RTD theme

0 comments on commit 2c73fbf

Please sign in to comment.