Browse Source

♻️ Simplify internal docs script (#11777)

pull/11842/head
gitworkflows 9 months ago
committed by GitHub
parent
commit
9d74b23670
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      scripts/mkdocs_hooks.py

2
scripts/mkdocs_hooks.py

@ -39,7 +39,7 @@ def on_config(config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
lang = dir_path.parent.name
if lang in available_langs:
config.theme["language"] = lang
if not (config.site_url or "").endswith(f"{lang}/") and not lang == "en":
if not (config.site_url or "").endswith(f"{lang}/") and lang != "en":
config.site_url = f"{config.site_url}{lang}/"
return config

Loading…
Cancel
Save