A Parsedown blog in Dropbox

update: I’ve now got this running in Jekyll, instead of the description below

My latest experiment, a blog in Dropbox!

I’ve copied all content from my other blogs to this one here, my new home. Hopefully this will be a bit more stable than the other solutions…

Why?

There’s three answers to that question:

First of all, my old blog was hosted on blogger.com, which had the nasty feature of being linked with Google+ (and deleting a photo in Google+ means it goes bye-bye on your blog as well). Blogger is also not that flexible in it’s set-up and sometimes new “features” get added that I don’t want.

Secondly, I wanted a way to edit my blog offline. Anywhere. Which is possible with Dropbox. I can now edit my blog on my phone, laptop or tablet anywhere I am. (another bonus of Dropbox is that I don’t have to worry about website-traffic anymore).

Thirdly and most importantly, this is of course a fun little project to hack together!

How?

This blog consists of small .md (markdown) files (one per blog-item), images and files I link to (like PDF-documents). All files are located on Dropbox (in the Public-folder, which only ‘old-accounts’ like mine still have). One a small php-script, is hosted at my own webhost.

When you go to http://www.matth-ijs.nl, the php-script requests a small file from Dropbox. In this file is a list of all blog-posts and their filenames. From this, the php-script creates a menu. It then also loads the most recent blogpost and shows that as first item.

This blogpost gets parsed, so that all links work, images are included and the markdown looks pretty (all handled by the parsedown library). As a final step I slightly modify all links so that they work nicely with Dropbox.

Thanks!

I use the Parsedown library to parse the blogposts, and a modified version of the Solar Ghost theme of Mattvh (where the CSS is pretty, it’s Mattvh, where it’s ugly, that’s my fault).

https://github.com/mattvh/solar-theme-ghost

http://parsedown.org/