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, 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.
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.
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.
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
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...
The plan is to edit my article on my iPad, upload it to the RaspberryPi, generate static site and publish to Heroku.
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.
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.
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.
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.