Fixed group plugin crashing on ENV vars for enabled setting

This commit is contained in:
squidfunk
2025-02-07 10:42:04 +07:00
parent 871e26c8b4
commit d4203f65bb
2 changed files with 16 additions and 2 deletions

View File

@@ -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))

View File

@@ -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))