mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
196 stars 55 forks source link

Support PlantUML Server as renderer #19

Closed nalaka closed 5 years ago

nalaka commented 5 years ago

Is it possible to use a locally running PlantUML Server for rendering instead of the plantuml executable? Maybe a setting to choose the executable or server?

Using the server is way faster than the binary. The difference is highly noticeable when using this plugin from something like MkDocs with live reload.

For comparison, this Visual Code Plugin allows toggling the renderer.

Note: A PlantUML server can be run at port 8080 with docker run -d -p 8080:8080 plantuml/plantuml-server:jetty

mikitex70 commented 5 years ago

I can work on it only in the weekend. Give me some time and I will try to implement your request. Thanks for your suggestion.

mikitex70 commented 5 years ago

I've a working version using a plantuml server but... I need to change the plugin name to avoid a module name conflict. Do you think will be reasonable to change the name of the plugin from plantuml to plantuml-markdown? This means that the configurations in other softwares (like MkDocs) must be changed too.

nalaka commented 5 years ago

I think it should be fine.

And thanks for the super fast response - I must say I am pleasently surprised!

:)

mikitex70 commented 5 years ago

Released version 2.0.0 which implements your request. Please update the plugin name in MkDocs from plantuml to plantuml-markdown. See the README.md for configuration options.

nalaka commented 5 years ago

Released version 2.0.0 which implements your request. Please update the plugin name in MkDocs from plantuml to plantuml-markdown. See the README.md for configuration options.

Thank you very much. It works perfectly.

I updated mkdocs.yml to

- plantuml_markdown:
        server: http://localhost:8080  # PlantUML server, for remote rendering

And started the PlantUML server with Docker:

docker run -d -p 8080:8080 plantuml/plantuml-server:jetty