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

Read The Docs updates #12687

Merged
merged 3 commits into from
Jul 18, 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
9 changes: 8 additions & 1 deletion docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,14 @@ ALL_MAN_BUILT = \
# built HTML and man docs into a separate location that is included in
# the tarball. This gives users a fully copy of the docs included in
# distribution tarballs.
html: $(ALL_MAN_BUILT)
#
# Note: we name this "html-local" because otherwise Automake issues a
# warning about us overriding its default "html" target. In our
# particular use case, the rules generated if we name this target
# "html-local" instead of "html" are effectively equivalent to when we
# name this target "html", so we might as well avoid the Automake
# warning.
html-local: $(ALL_MAN_BUILT)
$(OMPI_V_COPYALL) rm -rf html; cp -rp $(OUTDIR)/html .

man: $(ALL_MAN_BUILT)
Expand Down
13 changes: 11 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def read_version_file(path):
if not os.path.exists(path):
print(f"ERROR: Unable to find file {path}")
exit(1)

with open(path) as fp:
version_lines = fp.readlines()

data = dict()
for line in version_lines:
if '#' in line:
Expand Down Expand Up @@ -129,6 +129,15 @@ def get_tarball_version(path, expr):
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", "")

rtd_v = os.environ['READTHEDOCS_VERSION']
if os.environ['READTHEDOCS_VERSION_TYPE'] == 'external':
# Make "release" be shorter than the full "ompi_ver" value.
Expand Down
Loading