Skip to content

Commit

Permalink
release: bump version 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Aug 16, 2024
1 parent 3ea16cc commit 2955ebb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/469.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: add default logo links for Ansys and PyAnsys logos
14 changes: 14 additions & 0 deletions doc/source/user-guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ To use the logo in both dark and light modes, add the following code to the``htm
"logo": "no_logo",
}
.. note::

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.
If you want to change the link, you can set the ``logo_link`` option in the ``conf.py`` file.

For example:

.. code-block:: python
html_theme_options = {
"logo": "ansys",
"logo_link": "https://www.example.com",
}
.. note::

If you use the ``logo`` option, make sure to remove the ``html_logo`` option from the ``conf.py`` file.
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.0.4"
version = "1.0.5"
description = "A theme devised by ANSYS, Inc. for Sphinx documentation."
readme = "README.rst"
requires-python = ">=3.9,<4"
Expand Down
5 changes: 5 additions & 0 deletions src/ansys_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
JS_FILE = JS_PATH / "table.js"
LOGOS_PATH = STATIC_PATH / "logos"

ANSYS_LOGO_LINK = "https://www.ansys.com/"
PYANSYS_LOGO_LINK = "https://docs.pyansys.com/"

# make logo paths available
ansys_favicon = str((LOGOS_PATH / "ansys-favicon.png").absolute())
ansys_logo_black = str((LOGOS_PATH / "ansys_logo_black_cropped.jpg").absolute())
Expand Down Expand Up @@ -377,8 +380,10 @@ def configure_theme_logo(app: Sphinx):

if logo_option == "ansys":
theme_options["logo"] = ansys_logo
theme_options["logo_link"] = theme_options.get("logo_link", ANSYS_LOGO_LINK)
elif logo_option == "pyansys":
theme_options["logo"] = pyansys_logo
theme_options["logo_link"] = theme_options.get("logo_link", PYANSYS_LOGO_LINK)
elif logo_option == "no_logo":
theme_options["logo"] = None

Expand Down
2 changes: 1 addition & 1 deletion src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inherit = pydata_sphinx_theme
[options]
contact_mail =
github_url = https://github.com/ansys
logo.link = https://www.ansys.com/
logo_link =
show_breadcrumbs = True
show_icons = True
hidden_icons =
Expand Down

0 comments on commit 2955ebb

Please sign in to comment.