Brett on 01 Mar, 2023 03:14 PM
Does Marp have a command line tool? That's the only real prerequisite for running a custom processor. I don't see adding "official" support for this into Marked, but a custom processor should be a reasonable solution.
on 02 Mar, 2023 12:13 AM
It does. Would be awesome if there were official support as I'm fond of busting out quick presentations with markdown and Marked is part of my usual markdown workflow. Regardless, I did mess with this a bit and I have a sorta working solution. For the custom processor:
cat - >$tmpfile
if grep -q "marp: true" "$tmpfile"; then
marp "$tmpfile" -o -
But the usual themes make the slides tiny. I added a theme called "marp" that makes it display properly and doesn't compete with the styling provided by marp output:
Marked should recognize any change to the source Markdown file, so if you're not at least seeing the little spinner in the lower right activate when you save the file, something else is going wrong. Custom processors do not affect this.