]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
♻️ Simplify internal docs script (#11777)
authorgitworkflows <118260833+gitworkflows@users.noreply.github.com>
Sun, 14 Jul 2024 17:10:43 +0000 (23:10 +0600)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 17:10:43 +0000 (12:10 -0500)
scripts/mkdocs_hooks.py

index 8335a13f62914d490a49a05ee2199124f3a9e667..24ffecf46302c0577ffd4925b0a0471b80e4575f 100644 (file)
@@ -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