Skip to content

Commit fc54251

Browse files
authored
Merge pull request #100 from tuunit/mkdocs-drawio-support
add mkdocs-drawio plugin support
2 parents a648cff + 0061f61 commit fc54251

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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">

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name="mkdocs-print-site-plugin",
12-
version="2.3.6",
12+
version="2.4.0",
1313
description="MkDocs plugin that combines all pages into one, allowing for easy export to PDF and standalone HTML.",
1414
long_description=long_description,
1515
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)