Skip to content

Commit

Permalink
BUG: do not shorten links if theme_options['shorten_urls'] is not True
Browse files Browse the repository at this point in the history
  • Loading branch information
westurner committed Jan 27, 2025
1 parent 7b5cedd commit 2477db0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pydata_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ def setup(app: Sphinx) -> Dict[str, str]:

app.add_html_theme("pydata_sphinx_theme", str(theme_path))

app.add_post_transform(short_link.ShortenLinkTransform)

theme_options = utils.get_theme_options_dict(app)
if theme_options.get("shorten_urls") is True:
app.add_post_transform(short_link.ShortenLinkTransform)

app.connect("builder-inited", translator.setup_translators)
app.connect("builder-inited", update_config)
Expand Down

0 comments on commit 2477db0

Please sign in to comment.