mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-30 04:32:46 -04:00
♻️ Simplify internal docs script (#11777)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user