Plain Text Blogging

For the past two years, I’ve been writing my blog in Markdown and plain text - in fact, almost everything I write at home is in plain text format - using nValt, Byword and Marked2 I’m able to write everything I need (blog posts, emails and magazine articles) 1 2. With these three apps, I’ve been happily able to work on my MacBook, Windows laptop, work laptop, iPad, Amazon Fire tablet, Android phone and iPhone 3 - plain text documents synced to the cloud via Dropbox and accessible anywhere from pretty much any device I happen to be using.

This has worked nicely - I’ve no real complaints about the system (other than nValt is Mac only, so I have to resort to workarounds to search my notes in whatever text editor I’m using). The only thing that I would like is to edit my blog in Markdown. Which, I kind of already do as I use MarsEdit to post my blog posts to Wordpress and that allows me to write in Markdown and then post to Wordpress where it is converted into HTML. Whilst this works, I also want to be able to keep the data I write myself - putting it into Wordpress is actually a bit of a pain. Moving hosts means I have to download databases and files and back them up regularly - considering I backup my local files easily, trying to remember to backup the website or even rely on the fairly problematic Wordpress automatic backup plugins is a bit of a pain.

On this basis, I’d been looking at moving my site to a static site, using only a flat file system and no database. I’d have to be able to write in Markdown and ideally, I’d be able to self host the images and the HTML files. It would mean that I could host my site easily on whatever device or host I wanted. For example, I’d be able to use my Fastmail account to host the files as they have static site hosting (for low ish traffic websites) included as part of the annual fee. Otherwise, Github allow you to host a website with them and many other locations have static hosting. I could even use my Synology NAS to host them as well if I wanted - whilst the Synology will also take PHP and MySQL compatible files, I went for one of the lower models and therefore, I’d probably be taxing the CPU a lot if it wasn’t just a static site and I don’t want it interfering with my own use of it whilst at home!

So the quest for a static blogging site started - MarsEdit was something that I liked the idea of, writing in a program but this then pushes posts to websites. It wouldn’t have been to much of a problem, but MarsEdit doesn’t keep a copy of all the posts, only the most recent. Whilst I’m not the most prolific writer, I still wanted to be able to have a local copy that I could post elsewhere or move if I wanted to at a later date.

Jekyll / Octopress

So I looked at moving to Jekyll and Octopress and these seemed to be ideal - initially on first glance. They both generated static sites and would have allowed me to continue writing in Markdown. But they require installing Ruby (whilst it is installed on my Mac, the version isn’t new enough to run Octopress) and this was far more technical than I was wanting to do. I followed the guidance to try and install it, but it proved problematic and I decided that it was to much hassle. I wanted to be able to concentrate on writing and publishing, rather than messing around with code. I am a geek, but I don’t code day to day and therefore this seemed to be perhaps a bit of a step to far for me. To much time maintaining and trying to get the blog online and in a decent format before I could actually write anything!

Ghost

Ghost appealed to my nature of publish and write rather than concentrate on looks so I signed up to the website to give it a go. Whilst I was able to use it fairly well, it seemed that all the interaction was within the web editor and most of my writing is as far away from the web editor as I can get! This obviously wouldn’t stop me writing my articles within my text editor of choice and then copying and pasting into Ghost. However, I couldn’t quite get on with it - not entirely sure why.

And then, as it’s a premium software, there’s a monthly payment. In fairness, this goes towards the development and hosting costs, so it’s not like it’s unwarranted, but for the amount of blogging I actually do, I thought that perhaps it was a little steep. Of course, I could host it myself. But it’s node.js based again and it seems a complete PITA to actually setup, not knowing anything about node. It’s cheaper to get a Digital Ocean “droplet” and use their one click install Ghost to get up and running, rather than use the Ghost lowest package (but then, there are other perks that the Ghost platform does that Digital Ocean don’t do, like auto updates etc). Either way, I don’t think I can quite justify paying the Ghost fees and I don’t want to have to run my own server and maintain the system - whilst I could do it, it’s not something that I want to spend ages updating and trying to sort out. And there is the issue of backing it all up again!

Voodoopad

Voodoopad isn’t really a static blog publishing software, it just happens that as a by product of its design, it can act as a static blog publishing engine. It’s primary role is a wiki type software for the Mac that allows you create your own wiki space - linking different notes together, inserting pictures etc. It can export to a large number of formats, a webpage being one of them. This standard web export is good, but will export the document as a wiki type site - that is, no order to the chaos you’ve introduced into the document by adding articles! However, it does have a static site publishing feature - in fairness, I think this should be renamed into static blog generating as this is what it does - it creates an index page with your last x (selectable by the user) number of notes presented as articles and then generates an archive page with all the previous notes linked to as individual pages and the archive is sorted via date created. It also creates an RSS XML file for RSS readers to connect to.

In this fashion, it acts as a static blog generator with a number of limitations:

  • The date of the post is the creation date of the note within the software

  • The date of the note is not editable

With those two issues in mind, it makes it difficult to insert previous blog posts (so it would be ideal for new posts going forwards, but a bit of an issue otherwise).

To get around the issue above, I managed to set my computer time and date to the specific date that I wanted and then created the note for the post. This worked but was a bit long winded. The next issue I ran into - not all of my posts were published when I wanted to. You have to select which posts to publish and I’d made sure that all the ones I wanted were selected. However, it would only export five or so articles which made it problematic for publishing!

In the end, I tried to resolve the issues but I just couldn’t find a way of getting it sorted and therefore I decided to move on (with some regret, as it looked exactly what I was after).

Tumblr

Tumblr is synonymous with the sharing of GIF’s and short articles, however, I’ve used it in the past for writing and publishing. My personal blog and then my cycling blog were both published on Tumblr before I moved off to Wordpress. There were a number of issues I ran into using Tumblr as my blog software - namely the uploading and displaying of images for a long text post. I had been using MarsEdit to write my post and then upload all my photos/pictures to Flickr as there is a good integration between MarsEdit and Flickr. However, I was finding that occasionally Flickr would throw a hissy fit and not display the images how I wanted or would error out completely.

MarsEdit seemed to be ideal - I thought it was keeping a copy of all my posts but it was only keeping the most recent ones. Whilst all my posts were started in nValt, it would have been nice to have a copy in MarsEdit that I could then move to a new blog if I wanted to. In regards to backup, I ended up linking Tumblr to Evernote with IFTTT and using that to automatically send my Tumblr posts to Evernote!

Overall, Tumblr was probably the best blogging software that I’d used. Simple and easy with little to no hassle. It was even easy adding my own DNS records to have it point to my own Tumblr blog, though I could only seem to have a single domain point to a single blog, regardless of how many Tumblr blogs I could edit/write. In fairness, as a free service, this seems reasonable enough to limit it.

Hugo

Hugo could have appeared further up the list as I tried this after Jekyll and Octopress to be honest - but I gave up. After some more playing around with it though, I think I finally cracked it and have been able to get it working quite nicely.

It initially appealed to me - I just have to download the pre-compiled binary from Github and away you go. Well, initially. I was able to get a site up and running in seconds (as promised) but then I wasn’t able to get it uploaded to a website. I wasn’t even (at the time), able to generate a website - I could only use the Hugo server to display the pages! Whilst they state that this is perfectly fine for various sites, I wanted to export my items as HTML files and then I can use whatever web service I want.

Well, second time round and some editing of files and reading of data, I’ve managed to sort Hugo out to the point where I can produce a site and produce some output (as that’s what you’re reading now!)

It took some figuring out, but I think I managed to get there in the end. Finding out where and how to add images was an issue - even now, I’m having to use absolute paths to reference them within documents to get them showing up nicely in both the Hugo local server and the web server (it might be ok if I used the Hugo webserver to display my blog, but I’m using a hosting account, not a VPS where I have access to the processes on the server). And even with some figuring out, I’ve still got some issues to iron out - for example, my current theme is opening all links within new pages when viewed on my webserver, but this isn’t the case when viewed locally on the Hugo server. I’m not currently sure if this is due to my webserver setup or the theme itself.

If I want to change the theme in the future, I just build the blog using the new theme and all the content is create afresh using the new layout! Pretty simple!

As it gives each page its own folder (by default), I was able to replicate the Wordpress content layout for the backend so I should be able to link to all the old pages from Wordpress without any issues. this layout happens to be quite a nice layout (each post is in a folder for the year, then month) so I’m pretty happy with that. There are some edits I have to do to get previous images displaying correctly though but in general it works.

I’m just hoping that Google is now able to hit the webpages and start scraping it as a couple of my pages come fairly high up in Google search for specific items. The current theme allows me to use Google Analytics, but I’m not currently using it. It seems to be working nicely in both mobile and desktop browsers so that’s good to know.

Overall, it seems to be working pretty well, but I just have to change how I write some posts now - with having to give an absolute path for my images, I have to make sure I get the URL correct, as I’ve had a number of images fail to show where I’ve missed typed the URL! I’m sure Keyboard Maestro or Alfred can help with that!

Conclusion

So in the end, I’ve switched over to using Hugo - it suits my workflow quite nicely, though it does mean I do have some duplicate content on my Mac - namely images and posts. The post content I’m not to concerned with as the files are only a few Kb and I don’t post sufficiently for that to build up to unreasonable levels really. However, images could be an issue, but I’ve dropped them all down to 640x480 for display on the website (partly to cut down on the bandwidth and partly because this seems to be a reasonable size!) and I’ve run them through ImageOptim which drops the size of them (in terms of my PNG’s, quite considerably in terms of percentage though it does take some time to do so as ZOPFLI and PNGOUT aren’t the quickest tools to run - though they can be de-selected). If this begun to cause issues, I could always install Expandrive and have Hugo write directly to the host server via a virtual FTP drive - that would also save me uploading the information to the server after I’ve built the website at least!

With a few small niggles to resolve (adding a search bar to the website and wondering why it opens each page in its own tab), Hugo seems to be working quite nicely.


  1. In fact, the only thing I’ve been unable to write in Markdown is a letter. Perhaps with some conversion into LaTeX, it would work, but then I could just use LaTeX to write the letter itself - I’ve a few already written that I could use as a template. [return]

  2. Actually, I haven’t converted my invoices from Pages format into Markdown either, but these can remain as they are for the time being I think. [return]

  3. Not all at once! Over the course of two years, I’ve owned a lot of tech… [return]