sytsereitsma / mdbook-plantuml

mdBook preprocessor to render PlantUML diagrams to png images in the book output directory
MIT License
76 stars 14 forks source link

Creating DataURI for image inlining #32

Closed niko-dunixi closed 2 years ago

niko-dunixi commented 2 years ago

Should solve the issue for this preprocesssor and create a better user-experience. Also enables other downstream renderers to work agnostically and not only the html renderer. Can convert text files to data-uri but will still defer to the original text embedding method to preserve historical functionality

sytsereitsma commented 2 years ago

Thanks! This was on my list too. I don't often have time to look at the PRs here, so bear with me if my responses take a while. That said I'd prefer the data URIs to be an optional output format. I think a TOML config flag would be nice for this. Reason being data URIs are quite an arcane thing (at least to me) and I'd like to keep support for regular image generation.

Can you make that work?

niko-dunixi commented 2 years ago

Hello, @sytsereitsma! I can probably get that working, but I'm not sure what my bandwidth will be these next couple sprints. I'll try to squeeze that in. If you want, we could create a feature branch and make this a work-in-progress to eventually get merged into master so it can be incrementally worked on, but also still be co-located in the same repository. That's your call though

sytsereitsma commented 2 years ago

It's a feature branch now isn't it 😉 Just push your changes to it whenever you can find time.

I'll convert the PR to a draft

sytsereitsma commented 2 years ago

Hi Paul, Added the configurable bit myself. Thanks again.