Preamble

Permalink to “Preamble”

A few weeks ago scriptogr.am decided to suddenly change how their Markdown processor worked, making any HTML embedded in the Markdown posts worthless, among other things. So I woke up that my 2-readers-blog was looking like s**t, with content not being displayed[1], all because of the changes scriptogr.am did without any warning before.

These actions triggered some tweets to be sent, although I was already decided to move from scriptogr.am, angry with the time they made me waste.

Strike 1

Permalink to “Strike 1”

My first attempt was to go to calepin.co which is very similar with scriptogr.am, so the transition was very easy. BUT, they only supported CNAME records for custom domains which terminated my MX records, so bye-bye mail for a few hours until I noticed[2].

Break

Permalink to “Break”

Moved back to scriptogr.am, until I found a different solution. In the meantime they fixed the HTML and other Markdown issues people reported. So theoretically, I had no reason to move, until their next update, that is.

Octopress

Permalink to “Octopress”

I remembered reading on Ronny's blog, how he moved from scriptogr.am to using Octopress hosted on Heroku. He uses also a RaspberryPi to compile and publish his blog. Initially seemed a lot of overhead to do it this way, but hey, he's independent of any changes a service like scriptogr.am would decide to do.

So I did the same. I chose to have a CNAME record for www.alexchiri.com that points to Heroku and a REDIRECT from alexchiri.com to www.alexchiri.com. This way I had a custom domain and MX records, as Heroku doesn't support A records.

But there was still something missing...

Publishing from an iPad

Permalink to “Publishing from an iPad”

The plan is to edit my article on my iPad, upload it to the RaspberryPi, generate static site and publish to Heroku.

Step 1: SFTP

Permalink to “Step 1: SFTP”

Setting up SFTP on a Debian is quite easy, you can find a tutorial online. Set up on a group and user which can only access SFTP and restricted to a certain folder.

Step 2: Forward ports from the router to the RaspberryPi

Permalink to “Step 2: Forward ports from the router to the RaspberryPi”

In order to be able to connect to SSH I needed to map a port from the exterior to be redirected to my SSH port from the RasPi. And yes, I changed the default port.

Step 3: Dynamic DNS

Permalink to “Step 3: Dynamic DNS”

Considering my RaspberryPi sits in my living room and I don't have a dedicated IP for my internet connection, I needed some sort of dynamic DNS. I found an article about CloudFlare and RaspberryPi and used that solution.

Next steps

Permalink to “Next steps”

In this configuration, I edit my article with Editorial and upload it to my RaspberryPi with iFiles. Afterwards, I connect with iSSH and generate the static blog and publish. The last step I have in mind is to automate the last bit. To have a daemon watch the folder where the posts are uploaded and execute a script when the content of the folder is changed.

But I leave this for another day, as there are plenty of other things to do.

  1. Some time ago I started adding anchors like this one and I started using <img> tags to be able to add links on thumbnails inside posts. Starting with that Sunday update, anchors and HTML were not transformed anymore, being displayed like raw text. ↩
  2. Yeah, I'm not that great at networking, had no clue that you can't have CNAME records and MX at the same level. ↩