Skip to content

Commit

Permalink
Merge branch 'refactor/namespace-plugins' into feature/material-v9
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Nov 12, 2022
2 parents 1f70d9a + 68fcbe6 commit 17186b4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion material/partials/content.html
Original file line number Diff line number Diff line change
@@ -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" %}
Expand Down
2 changes: 1 addition & 1 deletion material/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions material/plugins/tags/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class TagsPluginConfig(Config):

# Tags plugin
class TagsPlugin(BasePlugin[TagsPluginConfig]):
supports_multiple_instances = True

# Initialize plugin
def on_config(self, config):
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/partials/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

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

Expand Down
2 changes: 1 addition & 1 deletion src/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/plugins/tags/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class TagsPluginConfig(Config):

# Tags plugin
class TagsPlugin(BasePlugin[TagsPluginConfig]):
supports_multiple_instances = True

# Initialize plugin
def on_config(self, config):
Expand Down

0 comments on commit 17186b4

Please sign in to comment.