Skip to content

Commit

Permalink
fix(plugin): Fix homepage detection
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkrzyskow committed Feb 4, 2024
1 parent 87bf823 commit 4de2104
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkdocs_static_i18n/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ class NavHelper:
f"/{self.current_language}/{homepage_suffix}",
]

# MkDocs resolves default/index.html, which isn't toplevel,
# however the resolved path in the plugin is index.html
if not config.use_directory_urls:
NavHelper.expected_homepage_urls.append("index.html")

i18n_nav = self.reconfigure_navigation(nav, config, files, NavHelper)
i18n_nav.homepage = NavHelper.homepage

Expand Down

0 comments on commit 4de2104

Please sign in to comment.