tombreit / mkdocs-git-latest-changes-plugin

MkDocs plugin that allows you to display a list of recently modified pages from the Git log
https://tombreit.github.io/mkdocs-git-latest-changes-plugin/
MIT License
1 stars 2 forks source link

Enable only on `build`, not on `serve` (configurable) #9

Closed tombreit closed 4 months ago

tombreit commented 4 months ago

Do not slow down docs (re-)generation while documenting and using --serve

class ThisConfig(Config):
    enabled_on_serve = Type(bool, default = False)

class Plugin(BasePlugin[ThisConfig]):
    def on_config(self, config):
        if not self.config.enabled_on_serve and self.is_serve:
            return
tombreit commented 4 months ago

Done in f467fec