Skip to content

Commit 84d08b0

Browse files
authored
Update conf.py (#61)
1 parent 73c5737 commit 84d08b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@
44
# list see the documentation:
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66

7+
import re
8+
79
# for PDF output on Read the Docs
810
project = "ROCm Data Center tool"
911
author = "Advanced Micro Devices, Inc."
1012
copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved."
1113

14+
with open('../CMakeLists.txt', encoding='utf-8') as f:
15+
match = re.search(r'.*\bget_version_from_tag\(\"([0-9.]+)\"', f.read())
16+
if not match:
17+
raise ValueError("VERSION not found!")
18+
version_number = match[1]
19+
1220
html_theme = "rocm_docs_theme"
1321
html_theme_options = {"flavor": "rocm"}
14-
html_title = f"RDC documentation"
22+
html_title = f"RDC {version_number} documentation"
1523
external_toc_path = "./sphinx/_toc.yml"
1624

1725
external_projects_current_project = "rdc"

0 commit comments

Comments
 (0)