Skip to content

Commit

Permalink
skip nav generation for languages that we do not build
Browse files Browse the repository at this point in the history
thx to @Stanzilla for spotting it
  • Loading branch information
ultrabug committed Feb 7, 2022
1 parent ae1b2e4 commit b1523f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mkdocs_static_i18n/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ def on_nav(self, nav, config, files):
"""
Translate i18n aware navigation to honor the 'nav_translations' option.
"""
for language in self.config["languages"]:
for language, lang_config in self.config["languages"].items():
# skip nav generation for languages that we do not build
if lang_config["build"] is False:
continue
if self.i18n_configs[language]["nav"]:
self._fix_config_navigation(language, self.i18n_files[language])

Expand Down

0 comments on commit b1523f5

Please sign in to comment.