Skip to content

Commit

Permalink
release: bump version1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Oct 2, 2024
1 parent b53c319 commit 41ea86a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.d/521.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: add version as params in cheatsheet
3 changes: 3 additions & 0 deletions doc/source/user-guide/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ that contain these keys, in the order given:
#. ``title``: Title of the cheat sheet to be displayed in the left navigation pane.
#. ``pages``: List of names for the pages to include the cheat sheet on. If no value is provided,
the cheat sheet is displayed only on the main ``index.html`` file.
#. ``version``: Version of the cheat sheet. If no value is provided, the version is ``main`` by default.

Here is an example of how to add the ``cheatsheet`` dictionary to the `html_theme_options`` dictionary:

Expand All @@ -178,6 +179,7 @@ Here is an example of how to add the ``cheatsheet`` dictionary to the `html_them
{
"cheatsheet": {
"file": "<file name including the extension of the cheat sheet>",
"version": "<version of the cheat sheet>",
"pages": "<list of names for the pages to include the cheat sheet on>", # Optional
},
},
Expand All @@ -192,6 +194,7 @@ main ``index.rst`` file and the ``learning.rst`` file in its "Getting started" s
{
"cheatsheet": {
"file": "getting_started/cheat_sheet.qmd",
"version": f"{version}",
"pages": ["index", "getting_started/learning"],
},
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-sphinx-theme"
version = "1.1.1"
version = "1.1.2"
description = "A theme devised by ANSYS, Inc. for Sphinx documentation."
readme = "README.rst"
requires-python = ">=3.10,<4"
Expand Down
3 changes: 3 additions & 0 deletions src/ansys_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def build_quarto_cheatsheet(app: Sphinx):

cheatsheet_file = cheatsheet_options.get("file", "")
output_dir = "_static"
version = cheatsheet_options.get("version", "main")

if not cheatsheet_file:
return
Expand Down Expand Up @@ -475,6 +476,8 @@ def build_quarto_cheatsheet(app: Sphinx):
"cheat_sheet-pdf",
"--output-dir",
output_dir_path,
"-V",
f"version={version}",
],
cwd=file_path,
capture_output=True,
Expand Down

0 comments on commit 41ea86a

Please sign in to comment.