I want to compile to mmd / HTML, with a sub-folder for images, in which the images will reside. This is not the default compile behaviour and if I simply move the images, it breaks the links.
Is there a simple workaround or compile option that I’m overlooking?
Have checked forums and handbook, but not come up,with anything.
I usually just use search and replace to fix image links if I need to use another folder than root. Just search for
src=" and replace with
Yes, ok. I thought about that. I was planning to amend the MMD source files so finding and replace may be a little trickier, but I get the idea.
Yes, that is a little trickier since images look a bit like hyperlinks in MMD, but Scrivener lists all of the image references at the bottom of the file, so you could select them and perform the search & replace within the selection, making it easier to avoid false-positives elsewhere.
Has this by chance gotten any easier in more recent releases? I’m getting pretty comfortable with post-processing in Scrivener, but I can’t seem to find anywhere that lets me put all of my images into an
images folder and have them automatically referenced properly in the Markdown I’m generating.
Thank you in advance!
Yes, since this thread was started, there are better ways to handle the problem than manual post-processing, though the fundamentals will be the same (create a subfolder, move the images, bulk search and replace the references in the .md file). You will need to use the regular “MultiMarkdown” selection when compiling, rather than any of the options that run MMD for you. This will enable the Processing pane, in the compile format designer, wherein you can either designate a script that you’ve written for doing this, or you can save the script right into the compile settings.
If you need conversion to another format, then you would need to execute MultiMarkdown as part of your post-processing.
Start with §21.5.2, Plain MultiMarkdown, pg. 540 in the user manual PDF, which explains the basic workflow. §24.22, Processing, pg. 678, goes over the Processing compile format pane itself, along with some usage examples that should help you get started.
I’d recommend installing MultiMarkdown separately, if you haven’t already, but if you don’t, you can always execute Scrivener’s embeded version, which is located here (assuming a standard installation):