Skip to content

Commit 2955ebb

Browse files
release: bump version 1.0.5
1 parent 3ea16cc commit 2955ebb

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

doc/changelog.d/469.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
feat: add default logo links for Ansys and PyAnsys logos

doc/source/user-guide/configuration.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,20 @@ To use the logo in both dark and light modes, add the following code to the``htm
5454
"logo": "no_logo",
5555
}
5656
57+
.. note::
58+
59+
By default, if ``ansys`` logo is displayed, the logo links to the Ansys website. If the PyAnsys logo is displayed, the logo links to the PyAnsys website.
60+
If you want to change the link, you can set the ``logo_link`` option in the ``conf.py`` file.
61+
62+
For example:
63+
64+
.. code-block:: python
65+
66+
html_theme_options = {
67+
"logo": "ansys",
68+
"logo_link": "https://www.example.com",
69+
}
70+
5771
.. note::
5872

5973
If you use the ``logo`` option, make sure to remove the ``html_logo`` option from the ``conf.py`` file.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
77
name = "ansys-sphinx-theme"
8-
version = "1.0.4"
8+
version = "1.0.5"
99
description = "A theme devised by ANSYS, Inc. for Sphinx documentation."
1010
readme = "README.rst"
1111
requires-python = ">=3.9,<4"

src/ansys_sphinx_theme/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
JS_FILE = JS_PATH / "table.js"
5555
LOGOS_PATH = STATIC_PATH / "logos"
5656

57+
ANSYS_LOGO_LINK = "https://www.ansys.com/"
58+
PYANSYS_LOGO_LINK = "https://docs.pyansys.com/"
59+
5760
# make logo paths available
5861
ansys_favicon = str((LOGOS_PATH / "ansys-favicon.png").absolute())
5962
ansys_logo_black = str((LOGOS_PATH / "ansys_logo_black_cropped.jpg").absolute())
@@ -377,8 +380,10 @@ def configure_theme_logo(app: Sphinx):
377380

378381
if logo_option == "ansys":
379382
theme_options["logo"] = ansys_logo
383+
theme_options["logo_link"] = theme_options.get("logo_link", ANSYS_LOGO_LINK)
380384
elif logo_option == "pyansys":
381385
theme_options["logo"] = pyansys_logo
386+
theme_options["logo_link"] = theme_options.get("logo_link", PYANSYS_LOGO_LINK)
382387
elif logo_option == "no_logo":
383388
theme_options["logo"] = None
384389

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inherit = pydata_sphinx_theme
44
[options]
55
contact_mail =
66
github_url = https://github.com/ansys
7-
logo.link = https://www.ansys.com/
7+
logo_link =
88
show_breadcrumbs = True
99
show_icons = True
1010
hidden_icons =

0 commit comments

Comments
 (0)