Skip to content

Support themes that extend material in reconfigure #316

@nejch

Description

@nejch

The plugin's reconfigure functionality seems to be a little too strict on detecting mkdocs-material, so themes that extend it cannot make use of the link awareness for the switcher it seems. See:

# material theme specific reconfiguration (can be disabled)
if config.theme.name == "material" and self.config.reconfigure_material is True:
# check and warn about missing mkdocs-material version

I think something like an allowed_themes plugin option defaulting to material might be enough, and people can override it then if needed. WDYT?

-        if config.theme.name == "material" and self.config.reconfigure_material is True:
+        if config.theme.name in self.config.allowed_themes and self.config.reconfigure_material is True: 

(or simply drop the if config.theme.name == "material" requirement and just look for the installed package)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions