I officially have a personal website / blog! I wrote my own blog engine for fun, which I don’t expect anyone else to use, but is nonetheless open sourced on GitHub.
The Story
I was rear-ended early this year and sustained severe whiplash and a minor concussion. I returned to work after a week or two, but my symptoms returned a month later, and I’ve been at home ever since.
When concussion symptoms last for more than three months, you are deemed to have Post-Concussion Syndrome. The mainstream protocol for getting better is to severely reduce the amount of mental and physical activity to engage in. Read for 15 minutes, then go rest. Listen to a podcast for 15 minutes, then go rest. If you have a few good days in a row, you increase your activity level a wee little bit. (I’ve had much better results following MMTR‘s PCS protocol, but that’s another story.)
For a long time, my doctor advised me to avoid screens. No TV, no cell phones, no tablets, no computers. For a techie like me, this was difficult.
As my condition improved and I was allowed to do little bits of computer time, I decided I would finally set up a personal website. After looking around at the usual suspects like WordPress, Ghost, and Jekyll, and concluding that they all met (exceeded) my needs, I decided to write my own anyways. It would provide me with a nice way to get my coding skills back up to speed, and it seemed a simple enough project that I could do it in sub-hour time increments.
The Blog Engine
I decided to branch out a little bit and implement my system in a technology I’ve not worked much with before, NodeJS.
I’m an avid listener of the Accidental Tech Podcast, and Casey Liss, one of the hosts, developed his own blog engine in Node, Camel, that aligned pretty closely with what I wanted to do: blog posts specified as Markdown files, no admin interface, super simple implementation. He also suggested deploying to Heroku, since there’s a great integration with git and Dropbox: deploy by simply pushing your branch to Heroku’s git remote, which is also synced with your Dropbox. That way, blog posts can be checked into the repository (and thus are versioned), and can be modified via Dropbox when you’re not at a development computer.
I read Casey’s source code, and while the rendering pipelines of our engines are nearly the same, the organization is quite different. Whereas Camel is arranged as a single app.js
file, mine is at least partly modularized in an MVC-lite sort of architecture. (It’s a super small codebase, so going whole hog didn’t really make sense.)
I ended up using Express for the web server with Handlebars views. NPM came in incredibly useful, providing most of the meat of the engine, with Markdown rendering, code highlighting, and my favourite new (to me) technology, promises. I have quibbles, especially with Handlebars’ no-logic-in-views philosophy, but that’s the subject of another post.
In any case, the blog engine is called Concussion, it’s powering this site, and it’s available on GitHub.