Skip to content

Commit

Permalink
Merge pull request #12690 from jsquyres/pr/v4.1.x/rtd-updates
Browse files Browse the repository at this point in the history
v4.1.x: docs/conf.py: updates per RTD docs
  • Loading branch information
jsquyres authored Jul 18, 2024
2 parents 59b9e78 + 0a3b1e7 commit 184c32a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 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('.'))

Expand Down Expand Up @@ -44,6 +44,23 @@
series = f"{ompi_data['major']}.{ompi_data['minor']}.x"
release = f"{ompi_data['major']}.{ompi_data['minor']}.{ompi_data['release']}{ompi_data['greek']}"

# If we are building in a ReadTheDocs.io environment, there will be
# READTHEDOCS environment variables.
#
# Relevant RTD env variables (documented
# https://docs.readthedocs.io/en/stable/builds.html#build-environment):
key = 'READTHEDOCS'
if key in os.environ and os.environ[key] == 'True':
print("OMPI: found ReadTheDocs build environment")

# Tell Jinja2 templates the build is running on Read the Docs
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True

# Define the canonical URL if you are using a custom domain on
# Read the Docs
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

# -- General configuration ---------------------------------------------------

Expand Down

0 comments on commit 184c32a

Please sign in to comment.