diff --git a/material/plugins/group/config.py b/material/plugins/group/config.py index ce7156e4e..d9a45ad03 100644 --- a/material/plugins/group/config.py +++ b/material/plugins/group/config.py @@ -27,5 +27,12 @@ from mkdocs.config.base import Config # Group plugin configuration class GroupConfig(Config): - enabled = Type(bool, default = False) + # While the canonical type for this setting is obviously bool, setting it + # from environment variables seems to have different effects on different + # systems. For instance, setting CI=true seems to correctly work on macOS, + # but not on Linux – see https://t.ly/MWj0H. + # + # Thus, as long as the value evaluates to a truthy or falsy value, the + # plugin will work as expected, until we find a better solution. + enabled = Type((bool, str, int), default = False) plugins = Type((list, dict)) diff --git a/src/plugins/group/config.py b/src/plugins/group/config.py index ce7156e4e..d9a45ad03 100644 --- a/src/plugins/group/config.py +++ b/src/plugins/group/config.py @@ -27,5 +27,12 @@ from mkdocs.config.base import Config # Group plugin configuration class GroupConfig(Config): - enabled = Type(bool, default = False) + # While the canonical type for this setting is obviously bool, setting it + # from environment variables seems to have different effects on different + # systems. For instance, setting CI=true seems to correctly work on macOS, + # but not on Linux – see https://t.ly/MWj0H. + # + # Thus, as long as the value evaluates to a truthy or falsy value, the + # plugin will work as expected, until we find a better solution. + enabled = Type((bool, str, int), default = False) plugins = Type((list, dict))