File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
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:
169
169
#. ``title ``: Title of the cheat sheet to be displayed in the left navigation pane.
170
170
#. ``pages ``: List of names for the pages to include the cheat sheet on. If no value is provided,
171
171
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.
172
173
173
174
Here is an example of how to add the ``cheatsheet `` dictionary to the `html_theme_options`` dictionary:
174
175
@@ -178,6 +179,7 @@ Here is an example of how to add the ``cheatsheet`` dictionary to the `html_them
178
179
{
179
180
" cheatsheet" : {
180
181
" file" : " <file name including the extension of the cheat sheet>" ,
182
+ " version" : " <version of the cheat sheet>" ,
181
183
" pages" : " <list of names for the pages to include the cheat sheet on>" , # Optional
182
184
},
183
185
},
@@ -192,6 +194,7 @@ main ``index.rst`` file and the ``learning.rst`` file in its "Getting started" s
192
194
{
193
195
" cheatsheet" : {
194
196
" file" : " getting_started/cheat_sheet.qmd" ,
197
+ " version" : f " { version} " ,
195
198
" pages" : [" index" , " getting_started/learning" ],
196
199
},
197
200
},
Original file line number Diff line number Diff line change @@ -443,6 +443,7 @@ def build_quarto_cheatsheet(app: Sphinx):
443
443
444
444
cheatsheet_file = cheatsheet_options .get ("file" , "" )
445
445
output_dir = "_static"
446
+ version = cheatsheet_options .get ("version" , "main" )
446
447
447
448
if not cheatsheet_file :
448
449
return
@@ -475,6 +476,8 @@ def build_quarto_cheatsheet(app: Sphinx):
475
476
"cheat_sheet-pdf" ,
476
477
"--output-dir" ,
477
478
output_dir_path ,
479
+ "-V" ,
480
+ f"version={ version } " ,
478
481
],
479
482
cwd = file_path ,
480
483
capture_output = True ,
You can’t perform that action at this time.
0 commit comments