sinedied / backslide

:sweat_drops: CLI tool for making HTML presentations with Remark.js using Markdown
https://sinedied.github.io/backslide
MIT License
764 stars 50 forks source link

Converting inline diagrams #68

Open vorner opened 4 years ago

vorner commented 4 years ago

Hello

I'm not sure this is the right place, or if I should try asking for this in some dependency.

I'm using the svgbob tool to draw diagrams. Currently, I have to put them to separate files, then run the tool to convert them and then include as images into the presentation. This works, but is suboptimal, because of the manual steps but also because having to open another file to look at what the image is adds extra work and context switch. It would be much nicer if this was somehow possible to do inline, eg:

# A slide with diagram

```bob
+-----------+
|    A box  |
+-----------+


Then some magic would happen and the presentation would contain the corresponding svg image.

I don't have an exact idea what the magic should be. I don't think hardcoding support for this specific tool makes much sense, but maybe some kind of configuration option of how to handle such block/plugin that it could call into would be nice.
sinedied commented 4 years ago

For now, there's no other way around than having a separate build step for the diagrams.

But I have plan to rework Backslide from scratch and make it open for custom plugins, and your use case would perfectly fit a plugin! I have no ETA on when it will be ready (I'm lacking free time right now...), but since your use case is quite straightforward it could be a good plugin example if you're willing to help me with it (once it's ready)?

BTW thanks for letting me know about svgbob, I love the concept 😉

vorner commented 4 years ago

Thanks for the information, some plugin system would be great, yes.

I might try helping if you ping me, then. But javascript isn't one of the languages I'd know, so I don't know how useful such help would be.