Merge branch 'refactor/namespace-plugins' into feature/material-v9

This commit is contained in:
squidfunk 2022-11-12 13:19:13 +01:00
commit 17186b4947
8 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{#- {#-
This file was automatically generated - do not edit This file was automatically generated - do not edit
-#} -#}
{% if "tags" in config.plugins %} {% if "material/tags" in config.plugins %}
{% include "partials/tags.html" %} {% include "partials/tags.html" %}
{% endif %} {% endif %}
{% include "partials/actions.html" %} {% include "partials/actions.html" %}

View File

@ -67,7 +67,7 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if "search" in config.plugins %} {% if "material/search" in config.plugins %}
<label class="md-header__button md-icon" for="__search"> <label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %} {% include ".icons/material/magnify.svg" %}
</label> </label>

View File

@ -42,6 +42,7 @@ class TagsPluginConfig(Config):
# Tags plugin # Tags plugin
class TagsPlugin(BasePlugin[TagsPluginConfig]): class TagsPlugin(BasePlugin[TagsPluginConfig]):
supports_multiple_instances = True
# Initialize plugin # Initialize plugin
def on_config(self, config): def on_config(self, config):

View File

@ -51,9 +51,9 @@ classifiers = [
] ]
[project.entry-points."mkdocs.plugins"] [project.entry-points."mkdocs.plugins"]
search = "material.plugins.search.plugin:SearchPlugin" "material/search" = "material.plugins.search.plugin:SearchPlugin"
social = "material.plugins.social.plugin:SocialPlugin" "material/social" = "material.plugins.social.plugin:SocialPlugin"
tags = "material.plugins.tags.plugin:TagsPlugin" "material/tags" = "material.plugins.tags.plugin:TagsPlugin"
[project.entry-points."mkdocs.themes"] [project.entry-points."mkdocs.themes"]
material = "material" material = "material"

View File

@ -21,7 +21,7 @@
# Requirements for core # Requirements for core
jinja2>=3.0.2 jinja2>=3.0.2
markdown>=3.2 markdown>=3.2
mkdocs>=1.4.0 mkdocs>=1.4.2
mkdocs-material-extensions>=1.1 mkdocs-material-extensions>=1.1
pygments>=2.12 pygments>=2.12
pymdown-extensions>=9.4 pymdown-extensions>=9.4

View File

@ -21,7 +21,7 @@
--> -->
<!-- Tags --> <!-- Tags -->
{% if "tags" in config.plugins %} {% if "material/tags" in config.plugins %}
{% include "partials/tags.html" %} {% include "partials/tags.html" %}
{% endif %} {% endif %}

View File

@ -136,7 +136,7 @@
{% endif %} {% endif %}
<!-- Button to open search modal --> <!-- Button to open search modal -->
{% if "search" in config.plugins %} {% if "material/search" in config.plugins %}
<label class="md-header__button md-icon" for="__search"> <label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %} {% include ".icons/material/magnify.svg" %}
</label> </label>

View File

@ -42,6 +42,7 @@ class TagsPluginConfig(Config):
# Tags plugin # Tags plugin
class TagsPlugin(BasePlugin[TagsPluginConfig]): class TagsPlugin(BasePlugin[TagsPluginConfig]):
supports_multiple_instances = True
# Initialize plugin # Initialize plugin
def on_config(self, config): def on_config(self, config):