timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
193 stars 39 forks source link

Fixing _vars deprecation warning #132

Closed dbermuehler closed 4 months ago

dbermuehler commented 4 months ago

With the latest mkdocs version (1.6.0), I received this deprecation warning when calling mkdocs serve or mkdocs build:

INFO    -  DeprecationWarning: Do not access Theme._vars, instead access the keys of Theme directly.
             File "/Users/dbermuehler/.local/share/virtualenvs/test-sX96YhBS/lib/python3.11/site-packages/mkdocs_git_revision_date_localized_plugin/plugin.py", line 82, in on_config
               theme_locale = custom_theme._vars.get("locale")
             File "/Users/dbermuehler/.local/share/virtualenvs/test-sX96YhBS/lib/python3.11/site-packages/mkdocs/theme.py", line 87, in _vars
               warnings.warn(

This PR will fixes this.

timvink commented 4 months ago

Thanks!