Skip to content

Commit 2ec6aa2

Browse files
committed
add --multiversion option to gen_docs.py and use in doc generation
1 parent 5d2439e commit 2ec6aa2

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/generate-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
source /opt/intel/oneapi/setvars.sh
7676
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.2/doxyrest-2.1.2-linux-amd64.tar.xz
7777
tar xf doxyrest-2.1.2-linux-amd64.tar.xz
78-
python scripts/gen_docs.py --doxyrest-root=`pwd`/doxyrest-2.1.2-linux-amd64 --verbose || exit 1
78+
python scripts/gen_docs.py --doxyrest-root=`pwd`/doxyrest-2.1.2-linux-amd64 --verbose --multiversion || exit 1
7979
python -c "import dpctl; print(dpctl.__version__)" || exit 1
8080
pushd "$(find _skbuild -name cmake-build)" || exit 1
8181
cmake --build . --target Sphinx || exit 1

scripts/gen_docs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ def parse_args():
9595
),
9696
)
9797

98+
p.add_argument(
99+
"--multiversion",
100+
action="store_true",
101+
help="Enable multiversion sidebar links in docs (default: False)",
102+
)
103+
98104
p.add_argument(
99105
"--clean",
100106
action="store_true",
@@ -137,6 +143,9 @@ def main():
137143
cmake_args += ["-DDPCTL_ENABLE_DOXYREST=ON"]
138144
cmake_args += [f"-DDoxyrest_DIR={args.doxyrest_root}"]
139145

146+
if args.multiversion:
147+
cmake_args += ["-DDPCTL_USE_MULTIVERSION_TEMPLATE=ON"]
148+
140149
log_cmake_args(cmake_args, "gen_docs")
141150

142151
env = os.environ.copy()

0 commit comments

Comments
 (0)