Skip to content

Commit

Permalink
fix(pdf): respect enabled configuration value
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrignon authored May 9, 2023
1 parent b2c1831 commit 4ce3e06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mkdocs_exporter/plugins/pdf/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def resolve(path: str) -> str:
def on_serve(self, server: LiveReloadServer, **kwargs) -> LiveReloadServer:
"""Invoked when the website is being served."""

if not self.config.enabled:
return
for path in [*self.config.stylesheets, *self.config.scripts]:
server.watch(path)
for cover in self.config.covers:
Expand All @@ -56,6 +58,9 @@ def on_serve(self, server: LiveReloadServer, **kwargs) -> LiveReloadServer:
def on_page_markdown(self, markdown: str, **kwargs) -> str:
"""Invoked when the page's markdown has been loaded."""

if not self.config.enabled:
return

content = markdown

if self.config.covers.front:
Expand Down

0 comments on commit 4ce3e06

Please sign in to comment.