Skip to content

Commit

Permalink
Update plugin.py
Browse files Browse the repository at this point in the history
fix 'DeprecationWarning: Do not access Theme._vars, instead access the keys of Theme directly.'
  • Loading branch information
YigesMx authored Sep 11, 2024
1 parent 407346e commit 95fb5fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mkdocs_git_revision_date_localized_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def on_config(self, config: config_options.Config, **kwargs) -> Dict[str, Any]:
# theme locale
if "theme" in config and "language" in config.get("theme"):
custom_theme = config.get("theme")
theme_locale = custom_theme._vars.get("language")
theme_locale = custom_theme["language"] if Version(mkdocs_version) >= Version("1.6.0") else custom_theme._vars.get("language")
logging.debug(
"Locale '%s' extracted from the custom theme: '%s'"
% (theme_locale, custom_theme.name)
Expand Down

0 comments on commit 95fb5fd

Please sign in to comment.