Marp presentations
Some of my markdown files are intended as presentations. For the last year, I've used marp.app for this purpose. But starting up a local web server and browsing to it is kind of awful. Also though there are flags for watching for changes, this doesn't work for me.
Way better would be to have Marked detect marp (when marp:true is in the frontmatter) and then preprocess the doc accordingly. I'm not as interested in separate presenter view type stuff, though that could be cool, too.
I'm guessing this could be possible using advanced preprocessors. Has anyone tried that? But also would like to ask for Marp support as a feature request.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by 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.
-Brett
On 28 Feb 2023, at 16:21, Patrick Walsh wrote:
2 Posted by Patrick Walsh 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:
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:
Then I can add the "Marked Style: marp" frontmatter to the markdown so Marked displays it properly. I can even navigate the slides, so that's not half bad.
The big gap is that changes don't get picked up by Marked. (Or something.) Maybe Marked is reprocessing, but some javascript needs to rerun before the display updates. I am not sure.
Right now, the best I can do is hit cmd-r in Marked and then arrow back to the slide I was on (cmd-r brings me back to the beginning), which is a bummer.
Any chance for some help to make these custom hacks work better?
Support Staff 3 Posted by Brett on 03 Mar, 2023 03:21 PM
If the failure to update is because JavaScript needs to be triggered, you can use the "hooks" feature to add an update hook. https://marked2app.com/help/Embedding_Scripts.html
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.
-Brett
On 1 Mar 2023, at 18:13, Patrick Walsh wrote: