AVATEAM-IT-SYSTEMHAUS / mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams
MIT License
42 stars 27 forks source link

feat: Add option to pre-download diagrams #1

Closed janLo closed 3 years ago

janLo commented 3 years ago

This adds an option DownloadImages which lets the plugin download the diagrams from kroki at build time and saving them as static assets rather than inserting a link to the configured kroki instance.

b-bittner commented 3 years ago

Hello @janLo , thank you very much for your PR, this feature was also on my list to add, but did not have the time to do it yet. So im really happy that something jumped in and extended the functionality of this package. I will have a look at the PR as soon as possible. BR Benjamin

janLo commented 3 years ago

Hey, thank you for your feedback.

I'm totally in favour of black and fstrings but I wanted to keep this of as small as possible for easier review. (it's already quite a change, given the amount of code the plugin has).

My further improvements on this would be:

But one thing at a time 😉.

janLo commented 3 years ago

I made a few adjustments to make mkdocs actually aware of the downloaded file so that the output is free of warnings.

b-bittner commented 3 years ago

I just tested it locally and everything looks good. @janLo, If you like you can add the changes from @fuzzy-focus also. After your feedback I will merge it.

janLo commented 3 years ago

I'd rather do modernizing/formatting as separate Mr to keep them on-topic.