onixpro / mkdocs-drawio-file

Embeding files of Diagrams.net (Draw.io) into MkDocs
23 stars 6 forks source link

Fix relative links to .drawio files that are not colocated with a pages markdown file #13

Closed noltedennis closed 9 months ago

noltedennis commented 1 year ago

This pull request fixes #12 .

This pull request provides a permanent fix such that files can be properly specified with relative paths - even to different hierarchy levels. Prior, a workaround was deployed that just stripped ../ from the start of relative paths. This, however, had negative side effects when the .drawio files were not colocated with the markdown page (e.g. if they are stored in a separate media file structure):

In addition, a third markdown page is introduced in the example that can be used to test the plugin for this edge case.

tuunit commented 10 months ago

As this repository doesn't seem to be maintained anymore :( I've created a fork and integrated your Commits in it as well

https://github.com/tuunit/mkdocs-drawio https://pypi.org/project/mkdocs-drawio/