Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation conf for readthedocs deprecations #485

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading