mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Improved Group plugin initialization for mike (#6534)
This commit is contained in:
@@ -38,6 +38,14 @@ from .config import GroupConfig
|
|||||||
class GroupPlugin(BasePlugin[GroupConfig]):
|
class GroupPlugin(BasePlugin[GroupConfig]):
|
||||||
supports_multiple_instances = True
|
supports_multiple_instances = True
|
||||||
|
|
||||||
|
# Initialize plugin
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
# Initialize object attributes
|
||||||
|
self.is_serve = False
|
||||||
|
self.is_dirty = False
|
||||||
|
|
||||||
# Determine whether we're serving the site
|
# Determine whether we're serving the site
|
||||||
def on_startup(self, *, command, dirty):
|
def on_startup(self, *, command, dirty):
|
||||||
self.is_serve = command == "serve"
|
self.is_serve = command == "serve"
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ from .config import GroupConfig
|
|||||||
class GroupPlugin(BasePlugin[GroupConfig]):
|
class GroupPlugin(BasePlugin[GroupConfig]):
|
||||||
supports_multiple_instances = True
|
supports_multiple_instances = True
|
||||||
|
|
||||||
|
# Initialize plugin
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
# Initialize object attributes
|
||||||
|
self.is_serve = False
|
||||||
|
self.is_dirty = False
|
||||||
|
|
||||||
# Determine whether we're serving the site
|
# Determine whether we're serving the site
|
||||||
def on_startup(self, *, command, dirty):
|
def on_startup(self, *, command, dirty):
|
||||||
self.is_serve = command == "serve"
|
self.is_serve = command == "serve"
|
||||||
|
|||||||
Reference in New Issue
Block a user