astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.16k stars 175 forks source link

Add hackmd.io plugin #289

Closed marwahaha closed 1 year ago

marwahaha commented 1 year ago

I like HackMD a lot which now has a slide mode. Although it uses reveal.js under the hood, I couldn't see how to get at the Reveal object itself. But you can advance using the down arrow, or right arrow if not possible to go down. Since this could not be done with generic, I made a new plugin.

It worked when I ran it on my computer. And if you do or don't want slide fragments, you can just change that in the HackMD url like ?fragments=false.

related to https://github.com/hackmdio/codimd/issues/33 and https://github.com/hackmdio/hackmd-io-issues/issues/161 . Note that the ?print-pdf option from HackMD wasn't working for my slide deck, it would make an extra empty slide in some places and not respect the additional CSS styling on the images.

astefanutti commented 1 year ago

Thanks a lot for the PR. As it’s very similar to the generic plugin, I wonder if adding an option to the later, to activate navigation with the down arrow, could be a solution, or at least extending the generic plugin to avoid duplication?

marwahaha commented 1 year ago

I think it might work to have a second "advance key": if "ArrowDown" doesn't change the slide then use "ArrowRight". But I don't know if that would be helpful for users outside of HackMD.

astefanutti commented 1 year ago

That’s a very good idea. I think it could be useful in general, as other presentation frameworks use that two-dimensional navigation system. Maybe an option could be added to the generic plugin to activate / deactivate that « second key ».

marwahaha commented 1 year ago

Ok! I won't have energy to build it but you can try it on the presentation https://hackmd.io/p/slide-example to make sure it works.

astefanutti commented 1 year ago

OK, no problem. I’ll work on it ASAP. Maybe you can create an issue, so it can be tracked. Meanwhile, we can close this.