Craft Academy

Läs mer om oss

The Thing About Blogging (in colour)

av Sam Joseph


So the thing about blogging is at least partly about selecting the medium. Marshall Mclunan said that the "medium is the message", but I think what he meant to say was that the medium is at least part of the message. I blogged every (week)day for a month before the summer break and I'm just starting up again. As part of the ongoing blogging resolution I also started distributing my blogs on twitter and linkedin. I wait a couple of weeks before tweeting/linking a blog, as I like to get some distance from the blog and re-read (and possibly re-edit) it before pushing it out to a wider audience. In doing so I make a few corrections, but I also noticed some differences between the various blogging platforms I push out on. So far those have been:

What I particularly notice is that none of these platforms have the code snippet syntax colorisation I have come to know and love at GitHub. Maybe it was 18 months of editing Makers Academy curriculum materials almost exclusively in GitHub markdown, or my ongoing intense use of GitHub, but I really love markdown, and particularly the way that GitHub renders code snippets. I just totally love that with a few simple ASCII only tricks I can make what looks to me like a really readable professional looking code document; and it also looks pretty readable in the pure ascii format too. The real clincher is the language specific back-tick code snippet. I can do three back-ticks and then add rb html js to indicate the syntax colorisation scheme I would like.

Now Ghost expects you to blog in markdown, with a live preview of how it will look in HTML, and it's pretty good. However the default code colouring is not there. Ghost is a great product and I'm sure there's a way to set up colourisation, but for Agile Ventures we've pretty much decided to switch to the middleman blog plugin because we can host via GitHub pages, and that makes things super fast, and also allows us tighter integration between our blog and the rest of our site. We had built a ghost theme that took our AV non-profits site CSS styles and applied them to our blog, but it was clearly unDRY in that whenever we updated the look and feel of our site, there would be another manual step to update the blog styles.

The big advantage of a Ghost blog is that it's more friendly to the non-technical user. Anyone can log in and start blogging in Markdown. Perhaps Markdown isn't that user friendly for non-technical folks? Blogger and Medium don't support it directly and to those who don't know the syntax perhaps it can seem obscure? However we don't have a strong business case for supporting non-technical users on the AV Blog, so middleman blog it is. The middleman blog also doesn't have code colourisation out of the box, but yesterday, joy of joys I found this blog post which showed how to get code colourisation in a middleman blog in four easy steps, and it worked! You've got to be careful of blog posts sometimes :-) Also I'm glad I stumbled on that first because there are other blog posts showing how to do the same thing that look much more involved.

I'm sure that Ghost has some similar solutions - a quick google shows me an angle although of course having not followed that path I can't tell what speed bumps there might be; but as I said we're pretty much set on middleman-blog, and I think I just need to deploy the code colourisation technique mentioned above (as well increasing the font size) and I think we'll be good.

In the interim I had been trying to work out good ways to import markdown into blogger and medium. I did find this great online markdown editor that allows you to export HTML called Dillinger but I couldn't easily get the styles imported into Medium or Blogger, and I suspect that the colourisation enabled middleman blog is going to be my first choice going forward when I have code snippets to display. There's a way to import gists into medium which I think I tried, but didn't get the syntax colourisation I wanted.

Medium has some other cool features like organisational blogging and automated post to twitter, but actually I'm happy to push to social media manually a couple of weeks after I blog rather than the same day. The different options make me think of the discussion on Ruby Rogues the other day about WordPress and how the devchat.tv site moved back to WordPress after being on a custom Rails app for a long time. I'm a bit shy of WordPress/PHP ever since I had some bad experiences with PHP in 2005 (although I thought the open documentation model was awesome), but that's a long time ago, and I'm sure the language is much more evolved and stable now. The key point in the RR episode was about not over-engineering - if WordPress will build the small business site you need then just use it, and let's get over any contempt culture that's got into our veins. That seems totally Agile to me - don't bring more power to solving the problem than necessary.

What I wonder is what WordPress has over Middleman, other than probably being older (more plugins?) and having a user base several orders of magnitude larger. For me I haven't stayed up with the PHP community/language and what I love about Middleman is that all the skills I've been polishing for the last ten years in Ruby and Rails and Git, translate directly to Middleman where I'm using Gemfiles, erb/haml, Ruby and version management via GitHub. Anyway, let's see how far out custom Middleman blog will get us before I break down and use WordPress ... :-)


Sam Joseph