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
-#}
{% if "tags" in config.plugins %}
{% if "material/tags" in config.plugins %}
{% include "partials/tags.html" %}
{% endif %}
{% include "partials/actions.html" %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -136,7 +136,7 @@
{% endif %}
<!-- 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">
{% include ".icons/material/magnify.svg" %}
</label>

View File

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