I've migrated my blog!


I've migrated my blog to my own custom platform. I won't write about why I did it, since I don't have a specific technical reason Blogger failed me. I simply wanted a bit more control over the platform, wanted a personal site on my own server anyways, and had a bit of an itch to scratch. But instead, I'll go over some of my technical and design choices and why I made them.

Language / platform: Python 2 and Flask. Really, it came down to experience: while it's not the hippest, most async, most badass platform, it's solid and works. Why Python 2? Again, just familiarity. Python 3 isn't a huge hurdle to me, but 2 is simply warmer and fuzzier.

Storage: The file system. All my posts live as un-rendered markdown in a subdirectory. To make a post, I create it, commit, and redeploy my Heroku app. Any images go in static/post-name/, though that's just a convention.

Post format: Markdown. I spend a lot of time on Reddit, so I'm used to it. It also renders really fast, which is nice since I didn't want to deal with caching and just re-render the post on each request. I might set up some simple caching at some point (since I can just have a cached/ directory that is cleaned on each re-deploy), but for now I can live without it since my blog is low-traffic.

I'm using Pygments for highlighting, which I'm very happy with. I set up a little system where I leave an HTML comment denoting the language before a markdown code block, since I dislike blog systems that guess at the language and end up highlighting shell output as Java or something. I'm also using the wonderful Solarized theme from PyPy. I dislike Solarized in my editor (it's too blue!), but for reading code it's so nice.

I also designed the site myself, which is probably obvious from how hideous it is, but it has some charm to me in its bare-bones look. I'll probably mess around with it more later, and try and get Jinja to generate nicer-looking code, but overall I'm pretty happy with it, for my first real shot at web design. Credits to Subtle Patterns for the nice background.

As for comments, I've taken a lead from prog21 and "outsourced" them to other sites. If I feel that I want feedback on a post, I post it on Reddit. Otherwise, I let the internet stumble upon it if they need it.

Overall, I'm happy with the exercise. My blog has gone from an inscrutable Google system to ~100 lines of Python (including the home and contact pages), and a few Jinja templates that are basically plain HTML.