1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-27 17:00:54 +01:00

Improved Group plugin initialization for mike (#6534)

This commit is contained in:
Kamil Krzyśków 2023-12-18 11:09:29 +01:00 committed by GitHub
parent 6e0b497ee8
commit 55fe1ccc53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -38,6 +38,14 @@ from .config import GroupConfig
class GroupPlugin(BasePlugin[GroupConfig]):
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
def on_startup(self, *, command, dirty):
self.is_serve = command == "serve"

View File

@ -38,6 +38,14 @@ from .config import GroupConfig
class GroupPlugin(BasePlugin[GroupConfig]):
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
def on_startup(self, *, command, dirty):
self.is_serve = command == "serve"