Skip to content

Commit

Permalink
Transition to Read the Docs Addons (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg authored Sep 27, 2024
1 parent dc9baee commit b271f98
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/source/conf/60-rtd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@
print(" rootpath: %s" % rootpath)
print(" confpath: %s" % confpath)

html_static_path = []

# See https://about.readthedocs.com/blog/2024/07/addons-by-default/#how-to-opt-in-to-addons-now
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True

import matplotlib

matplotlib.use("agg")


# 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".
if on_rtd:
html_static_path = []
else:
# 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"]

0 comments on commit b271f98

Please sign in to comment.