Generating multiple web pages from Scrivener

Hello

I’ve been using MMD to happily generate a LaTex PDF with four chapters (to my great satisfaction). I now want to generate a set of web pages to mirror the same content in HTML. I’m starting with Scrivener, compiling to MMD / HTML and wondering what to do next.

I’m mainly wondering about the most efficient way to generate a series of web pages, rather than one single long one. I’m also using Marked and MMD Composer to view the HTML output, because that provides a layer of CSS that sufficiently “pretties” the output.

  • Can anyone point me in the right direction to what might be a sensible workflow?
  • Do I need to (use MMD Composer to) manually divide the single HTML output file from Scrivener (or Marked)? Or is there a way to separate the files from the outset?
  • I will probably publish the end result either in a section of my WordPress website, or via GitHub Pages.

Any thoughts gratefully appreciated.

If HTML5 is okay, I would try Fletcher’s ePub generator. Since ePub files are by definition a series of web pages, all you would need to do after using that utility is unzip the ePub file and grab the HTML files out of it.

If you are using WordPress and Github though, I would wonder why you even want to generate HTML when both systems can take Markdown code just fine.

I could be wrong, but doesn’t WordPress need a plugin to parse markdown? Or has this changed?
What I do is to paste the content in iAWriter and export to very clean html. I need a plugin though to prevent WordPress from fuddling with the clean Html-Code.

That’s correct, you need a plug-in for WP to recognise Markdown (there may even be one for MMD, I haven’t checked in a while).

Thanks for this information. It partially answers my issue.

However, what I really wanted to ask was whether there was a compile option that would allow me to generate HTML files, one for each chapter, that related cleanly to each other, without manual editing.

I have a single scrivener ‘file’ that compiles to mmd->latex->PDF, with four chapters.

I’m now understanding that the only solution is to compile each chapter separately and then manually edit the mmd files to link the chapters to each other, and then generate HTML files accordingly.

Does thus sound about right?

Thnx! :smiley:

No, there isn’t a way to do that which is why I suggested giving the ePub generator a try, since that will turn a singular HTML file into multiple HTML files. That may or may not work, but the short answer is that Scrivener is not set up for this kind of work. Its design is based around the concept of using a project to create a document, not to be a generator for many documents. There are some edge cases here and there that skirt around that—not using Compile and using Export instead, using the iBooks Author format for multiple docx files, and post-processing with scripts and separators—but by and large this is a program designed to make a document at the end of the day.

That’s fine. I don’t mind doing the work-- I just don’t want to miss a trick if ones available.

I did generate an ePub file, using markdown composer, but couldn’t get inside it! (i know there not exactly what you suggested)

Basically, I’m setting up a workflow for a whole curriculum that needs to be, If not quite all things to all people, then certainly many things to many people! So that will require multiple PDFs, but some people will struggle to download them (my chief constituency is in Africa, where download speeds are slower and costlier ) so I need to make them available as short HTML files. At least I think these are my best options.

Thnx again! :smiley:

Did you try unzipping it first? ePub files are just Zip files by a different extension. You can either unzip them verbatim on the command-line with [b]unzip name_of_file.epub[/b] or change the extension to .zip and double-click it in Finder. I find the former method to be more reliable as OS X’s archive utility sometimes gets a little confused by the type of zip method used and you end up with a file that won’t decompress. Third-party compression tools work better than Apple’s, I’ve found, too.

Thnx. I’ll give that a try. :smiley: