diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 217868b5b8..4ca50fc298 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -196,7 +196,7 @@ class MyPluginConfig(base.Config): bar = c.Type(str, default='') class MyPlugin(plugins.BasePlugin[MyPluginConfig]): - def on_page_markdown(self, markdown: str, *, config: base.MkDocsConfig, **kwargs): + def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo < 5: # Error, `foo` might be `None`, need to check first. if config.site_url.startswith('http:'): # Error, MkDocs' `site_url` also might be `None`. return markdown + self.config.baz # Error, no such attribute `baz`! @@ -206,7 +206,7 @@ This lets you notice the errors from a static type checker before running the co ```python class MyPlugin(plugins.BasePlugin[MyPluginConfig]): - def on_page_markdown(self, markdown: str, *, config: base.MkDocsConfig, **kwargs): + def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo is not None and self.config.foo < 5: # OK, `int < int` is valid. if (config.site_url or '').startswith('http:'): # OK, `str.startswith(str)` is valid. return markdown + self.config.bar # OK, `str + str` is valid. @@ -1271,7 +1271,7 @@ work for version 0.16, but may be removed in a future version. Use `config.var_name` instead, where `var_name` is the name of one of the [configuration] variables. -[configuration]: /user-guide/configuration.md +[configuration]: ../user-guide/configuration.md Below is a summary of all of the changes made to the global context: diff --git a/docs/dev-guide/translations.md b/docs/dev-guide/translations.md index ea3e5a8725..2fd20c34b4 100644 --- a/docs/dev-guide/translations.md +++ b/docs/dev-guide/translations.md @@ -54,8 +54,8 @@ translation by following the steps below. Here is a quick summary of what you'll need to do: -1. [Fork and clone the MkDocs repository](#fork-and-clone-the-mkdocs-repository) and then [install MkDocs for development](/about/contributing/#installing-for-development) for adding and testing translations. -2. [Initialize new localization catalogs](#initializing-the-localization-catalogs) for your language (if a translation for your locale already exists, follow the instructions for [updating theme localization files](/user-guide/custom-themes/#localizing-themes) instead). +1. [Fork and clone the MkDocs repository](#fork-and-clone-the-mkdocs-repository) and then [install MkDocs for development](../about/contributing.md#installing-for-development) for adding and testing translations. +2. [Initialize new localization catalogs](#initializing-the-localization-catalogs) for your language (if a translation for your locale already exists, follow the instructions for [updating theme localization files](#updating-the-translation-catalogs) instead). 3. [Add a translation](#translating-the-mkdocs-themes) for every text placeholder in the localized catalogs. 4. [Locally serve and test](#testing-theme-translations) the translated themes for your language. 5. [Update the documentation](#updating-theme-documentation) about supported translations for each translated theme. @@ -74,10 +74,10 @@ use of a term which differs from the general language translation. In the following steps you'll work with a fork of the MkDocs repository. Follow the instructions for [forking and cloning the MkDocs -repository](/about/contributing/#installing-for-development). +repository](../about/contributing.md#installing-for-development). To test the translations you also need to [install MkDocs for -development](/about/contributing/#installing-for-development) from your fork. +development](../about/contributing.md#installing-for-development) from your fork. ### Initializing the localization catalogs diff --git a/mkdocs/plugins.py b/mkdocs/plugins.py index 64d17743c3..eeb7139e3f 100644 --- a/mkdocs/plugins.py +++ b/mkdocs/plugins.py @@ -628,8 +628,8 @@ def get_plugin_logger(name: str) -> PrefixedLogger: ```python from mkdocs.plugins import get_plugin_logger - logger = get_plugin_logger(__name__) - logger.info("My plugin message") + log = get_plugin_logger(__name__) + log.info("My plugin message") ``` """ logger = logging.getLogger(f"mkdocs.plugins.{name}")