Markdown output destroys formatting

Although Scrivener provides output in Markdown, the file created always needs a lot of work to format it for Medium.com.

What’s the best way to compile for Medium.com?

Have you asked Medium? I don’t know about them specifically, but a lot of web content tools support Word or RTF import.

Also, what do you have to do to Scrivener output to get it ready for Medium? That might help us give better advice.

While I think there are ways of sticking with Markdown for Medium, it looks a bit geeky, and is probably better if you intend to do this a lot.

What is probably simpler is to select MultiMarkdown → ODT from the Compile for menu, and going from there. But if Medium isn’t OpenOffice-friendly, installing Pandoc, restarting Scrivener, and selecting Pandoc → DOCX should be pretty straight-forward.

I’m no Medium expert though, so this is more general advice for getting a Markdown workflow into the rich text world, which Medium seems to prefer.

Of course, if the OP is only touching markdown b/c they are thinking this is what Medium wants, then if Medium accepts filetypes like docx, they can just type things out in rich text in the familiar way and compile directly to docx. No Pandoc etc needed.

As far as I can tell (Medium’s support docs do not clearly mention anything practical, it is all SEO and the zen of making money), Medium uses HTML for import, and I’ve seen posts suggesting to preview your markdown as HTML then copy and paste that. Marked 2 on macOS allows you to live preview (even from a Scrivener project), and copy the HTML so maybe this would be a good workflow? Or use VSCode for a free markdown preview…

1 Like

That’s good to hear. HTML is a much cleaner and easier solution for web publishing than Word files, and Markdown is superb at creating HTML, so it should prove a good way of working with that system, though perhaps with a few tweaks.

For that, I guess we’re back to the original questions though: what sort of work are you, @vamfoom, finding yourself doing? Chances are, if it is repetitive in nature, we can help.

I figured out that Scrivener, by default, does not output Markdown even when you select Markdown as the output. It would be helpful if Scrivener provided a sensible default for this. By default, Scrivener compiles the document as plain text without the markdown.

After doing Googling, I found that you need to configure the “Assign Section Layouts” for Scrivener to output the markdown syntax.

Chapter 21 would probably be a good place to go, in the user manual PDF, if you are interested in this workflow. It isn’t clear what you mean by Scrivener not outputting Markdown, for instance, given it’s design intent as a Markdown writing platform—i.e. you’d write in it more like you’d write in VS Code. The Markdown choices in the compiler are to automate what would otherwise require command-line tools to convert your Markdown into HTML, or whatever you select.

But that all aside, if you are not actually writing using Markdown, and Medium has no clue what to do with Markdown, that really does go back to gr’s main question: why not just compile using the HTML output?

Well, you need to Assign Section Layouts to do much of anything with the Compile command. Otherwise, you’ll just get whatever you have in the Editor dumped straight to the output file.