Skip to content
Open
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
13 changes: 10 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
},
}

rtd_config_file = os.environ.get("READTHEDOCS_CONFIG")
if rtd_config_file and not os.environ.get("PROJECT"):
config_name = os.path.basename(rtd_config_file)
base, _ = os.path.splitext(config_name)
if base.startswith(".readthedocs."):
project_name = base[len(".readthedocs."):]
if project_name:
os.environ["PROJECT"] = project_name

docset = get_project(multiproject_projects)

# Disable custom 404 on dev docs
Expand Down Expand Up @@ -161,9 +170,7 @@
"logo_only": True,
}
html_context = {
# Fix the "edit on" links.
# TODO: remove once we support different rtd config
# files per project.
# Fix the "edit on" links for each project.
"conf_py_path": f"/docs/{docset}/",
"display_github": True,
"github_user": "readthedocs",
Expand Down
Loading