Skip to content

Commit

Permalink
Fix documentation conf for readthedocs deprecations (#485)
Browse files Browse the repository at this point in the history
## Description

<!-- Provide a brief description of the PR's purpose here. -->

See https://about.readthedocs.com/blog/2024/07/addons-by-default/

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
  • Loading branch information
btjanaka authored Jul 17, 2024
1 parent 0177ac3 commit 20bd99f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#### Documentation

- Fix documentation conf for readthedocs deprecations ({pr}`485`)
- Add novelty search with CMA-ES to sphere example ({pr}`478`, {pr}`482`)

#### Improvements
Expand Down
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
sys.path.insert(0, os.path.abspath("..")) # Detect ribs.
sys.path.append(os.path.abspath("./_ext")) # Detect extensions.

# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

DEV_MODE = os.environ.get("DOCS_MODE", "regular") == "dev"
READTHEDOCS_VERSION = os.environ.get("READTHEDOCS_VERSION", "stable")
READTHEDOCS_LANGUAGE = os.environ.get("READTHEDOCS_LANGUAGE", "en")
Expand Down Expand Up @@ -136,6 +139,10 @@
html_title = (f"pyribs (stable - v{version})" if READTHEDOCS_VERSION == "stable"
else f"pyribs ({READTHEDOCS_VERSION})")

# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True

# material theme options (see theme.conf for more information)
html_theme_options = {
"nav_title": "pyribs",
Expand Down

0 comments on commit 20bd99f

Please sign in to comment.