Skip to content

Commit b73ef16

Browse files
committed
add mkdocs-drawio plugin support
1 parent a648cff commit b73ef16

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

mkdocs_print_site_plugin/plugin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,18 @@ def on_post_build(self, config, **kwargs):
357357
.add_javascript_variables(html, self.print_page, config)
358358
)
359359

360+
# Compatibility with mkdocs-drawio
361+
# As this plugin adds renderer html for every drawio diagram
362+
# referenced in your markdown files. This rendering happens
363+
# in the on_post_page event, which is skipped by this plugin
364+
# therefore we need to manual execute the drawio plugin renderer here.
365+
if config.get("plugins", {}).get("drawio"):
366+
html = (
367+
config.get("plugins", {})
368+
.get("drawio")
369+
.render_drawio_diagrams(html, self.print_page)
370+
)
371+
360372
# Compatibility with https://github.com/g-provost/lightgallery-markdown
361373
# This plugin insert link hrefs with double dashes, f.e.
362374
# <link href="//assets/css/somecss.css">

0 commit comments

Comments
 (0)