File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ fix: add version as params in cheatsheet
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ that contain these keys, in the order given:
169169#. ``title ``: Title of the cheat sheet to be displayed in the left navigation pane.
170170#. ``pages ``: List of names for the pages to include the cheat sheet on. If no value is provided,
171171 the cheat sheet is displayed only on the main ``index.html `` file.
172+ #. ``version ``: Version of the cheat sheet. If no value is provided, the version is ``main `` by default.
172173
173174Here is an example of how to add the ``cheatsheet `` dictionary to the `html_theme_options`` dictionary:
174175
@@ -178,6 +179,7 @@ Here is an example of how to add the ``cheatsheet`` dictionary to the `html_them
178179 {
179180 " cheatsheet" : {
180181 " file" : " <file name including the extension of the cheat sheet>" ,
182+ " version" : " <version of the cheat sheet>" ,
181183 " pages" : " <list of names for the pages to include the cheat sheet on>" , # Optional
182184 },
183185 },
@@ -192,6 +194,7 @@ main ``index.rst`` file and the ``learning.rst`` file in its "Getting started" s
192194 {
193195 " cheatsheet" : {
194196 " file" : " getting_started/cheat_sheet.qmd" ,
197+ " version" : f " { version} " ,
195198 " pages" : [" index" , " getting_started/learning" ],
196199 },
197200 },
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
55[project ]
66# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
77name = " ansys-sphinx-theme"
8- version = " 1.1.1 "
8+ version = " 1.1.2 "
99description = " A theme devised by ANSYS, Inc. for Sphinx documentation."
1010readme = " README.rst"
1111requires-python = " >=3.10,<4"
Original file line number Diff line number Diff line change @@ -443,6 +443,7 @@ def build_quarto_cheatsheet(app: Sphinx):
443443
444444 cheatsheet_file = cheatsheet_options .get ("file" , "" )
445445 output_dir = "_static"
446+ version = cheatsheet_options .get ("version" , "main" )
446447
447448 if not cheatsheet_file :
448449 return
@@ -475,6 +476,8 @@ def build_quarto_cheatsheet(app: Sphinx):
475476 "cheat_sheet-pdf" ,
476477 "--output-dir" ,
477478 output_dir_path ,
479+ "-V" ,
480+ f"version={ version } " ,
478481 ],
479482 cwd = file_path ,
480483 capture_output = True ,
You can’t perform that action at this time.
0 commit comments