Skip to content

Commit 2dab64c

Browse files
committed
add logic to find doc_versions.txt
1 parent 2ec6aa2 commit 2dab64c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/doc_sources/conf.py.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,12 @@ if generate_multiversion == "ON":
143143
# POPULATE LINKS TO OTHER VERSIONS
144144
html_context["versions"] = list()
145145

146-
# Populate the list of documented versions from the doc_versions.tx
146+
# Populate the list of documented versions from the doc_versions.txt
147147
versions = []
148-
with open("doc_versions.txt", "r") as doc_versions:
148+
149+
conf_dir = os.path.dirname(os.path.abspath(__file__))
150+
versions_file = os.path.join(conf_dir, "..", "doc_versions.txt")
151+
with open(versions_file, "r") as doc_versions:
149152
while True:
150153
version = doc_versions.readline().strip()
151154
if not version:

0 commit comments

Comments
 (0)