Skip to content

Commit

Permalink
Merge pull request #100 from tuunit/mkdocs-drawio-support
Browse files Browse the repository at this point in the history
add mkdocs-drawio plugin support
  • Loading branch information
timvink authored Apr 10, 2024
2 parents a648cff + 0061f61 commit fc54251
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions mkdocs_print_site_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,18 @@ def on_post_build(self, config, **kwargs):
.add_javascript_variables(html, self.print_page, config)
)

# Compatibility with mkdocs-drawio
# As this plugin adds renderer html for every drawio diagram
# referenced in your markdown files. This rendering happens
# in the on_post_page event, which is skipped by this plugin
# therefore we need to manual execute the drawio plugin renderer here.
if config.get("plugins", {}).get("drawio"):
html = (
config.get("plugins", {})
.get("drawio")
.render_drawio_diagrams(html, self.print_page)
)

# Compatibility with https://github.com/g-provost/lightgallery-markdown
# This plugin insert link hrefs with double dashes, f.e.
# <link href="//assets/css/somecss.css">
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

0 comments on commit fc54251

Please sign in to comment.