Skip to content

Commit

Permalink
fix(reconfigure): file.page can be None and make plugin crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ultrabug committed May 2, 2024
1 parent 236fe2b commit eb3d76d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocs_static_i18n/reconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ def reconfigure_material_blog(self, nav: Navigation, mkdocs_config: MkDocsConfig
file.norm_src_uri = i18n_file.norm_src_uri
file.url = i18n_file._get_url(mkdocs_config.use_directory_urls)
#
file.page._set_canonical_url(mkdocs_config.get('site_url', None))
if file.page:
file.page._set_canonical_url(mkdocs_config.get('site_url', None))

# reconfigure blog files alternates to the best we can
# since we are past the on_files event and files useless to the current language
Expand Down

0 comments on commit eb3d76d

Please sign in to comment.