Markdown format for content management

Markdown format for content management

The native editing format for a regular CMS like WordPress, Drupal or Joomla is HTML, and that's natural, since what the visitor will see is an HTML page.

But for content generation we don't usually type code. Instead, we use a WYSIWYG editor, such as CKEditor. Thanks to these add-ons, without needing to know HTML or, in case you do, without the hassle of typing brackets, you can apply bold, italic and other styles to your content. The WYSIWYG add-on then translates it into HTML. However, IMHO this poses a problem: if we bring styles from an external editor such as Word or Pages, that often generates a dirty code, which results in pages with irregular styling (i.e. line spacing), or redundant styles. I don't really like that, so I always write HTML from scratch, with a little help of a good code editor like Notepad++ - but obviously you cannot expect everyone to do that.

The alternative is not clear, but one of my best candidates is to use Markdown markup. You can find a lot of literature about it, but as a bottom line it offers a more natural markup in comparison to HTML tagging. For example, in Markdown we use **bold** instead of <strong>bold</strong>. To find out more about this format I recommend the cheat sheet by Adam Pritchard. This system, like any other, has good things, and not-so-good things:

  • Advantages: whatever the source editor, Markdown only takes into account the visible marks - no hidden dirty formats in the final text. So it is very easy to edit in word, or notepad, and bring it to your CMS of choice. The styled text is internally converted to HTML, but when editing the text, we always see the original Markdown. In fact, this is the standard markup in GitHub (and the .md file extension), and is very similar to the Wikipedia editing format.
  • Disadvantages: there is some learning and, worst of all, we need to make the whole system understand the format (the CMS itself, and all translation-related modules). Drupal, for instance, has a good implementation of Markdown, but the Lingotek translation module, which I love, doesn't understand Markdown, so you're stuck with traditional copy & paste translation.

If you're looking for an external editor to cope with translation management or to simply to keep a local copy of all contents, there are many alternatives. To edit Markdown you do not need a specific editor, but if you need style preview, there are specific editors like MarkdownPad (Win), Macchiato (Mac), Mou (Mac) or Haroopad. You may prefer using an IDE or HTML editor with Markdown preview. Within this category we find the free editor by GitHub, called Atom, or the one I'm currently using, Brackets, which is also free despite being by Adobe, and lets you preview Markdown by adding a plugin. If you like zenware, or you're just looking for a clean, distraction-free Markdown editor, there's a few nice options out there, Texts, iA Writer (Mac), and Writemonkey (Win).

BTW, this article is originally formatted using Markdown.