Skip to content

Commit 2477db0

Browse files
committed
BUG: do not shorten links if theme_options['shorten_urls'] is not True
1 parent 7b5cedd commit 2477db0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pydata_sphinx_theme/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ def setup(app: Sphinx) -> Dict[str, str]:
284284

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

287-
app.add_post_transform(short_link.ShortenLinkTransform)
287+
288+
theme_options = utils.get_theme_options_dict(app)
289+
if theme_options.get("shorten_urls") is True:
290+
app.add_post_transform(short_link.ShortenLinkTransform)
288291

289292
app.connect("builder-inited", translator.setup_translators)
290293
app.connect("builder-inited", update_config)

0 commit comments

Comments
 (0)