I like websites, especially figuring out what makes them tick. When I was younger I would search the internet to learn things like HTML, CSS, etc., trying to figure it out to the best of my ability. W3Schools and similar sites were great resources but I found that I learned better by deconstructing websites that I used frequently and admired. So in this blog post I wanted to cover how this site works in detail because I think it’s interesting to discuss and hopefully someone out there who shares that interest will be able to take something away from it.
The hosting situation
This site is currently hosted with the kind folks over at NearlyFreeSpeech.net and has been since 2012. They are an honest host that only asks for enough money to keep the lights on while at the same time providing a great service. Since I don’t need anything fancy like PHP or MySQL, their hosting options work out really well for me. There is a pretty sharp learning curve to figuring out their account interface (it’s no cPanel), but once you get a handle on how it works it can be very rewarding.
As for the more technical details, the site is running off an Apache 2.4 server, all the content that gets pushed to it is static. DNS is handled directly through NFS.net too. The primary method of interacting with the server to push content is via SSH. The domain name is hosted by Hover.
The content management situation
I have tried a couple different content management solutions with this site in the past. For a while I was running Movable Type, then I became intrigued with static blog engines like toto by cloudhead and was using that for a bit. I was figuring out as much Ruby on Rails as I could to get these to work and I think it paid off. I played around with some Heroku hosted stuff before finally settling on using Jekyll. At first I wasn’t sure if I really wanted to use Jekyll; it seemed a little too mainstream to me, but I think I just didn’t understand all that you could do with it at the time. After spending some time with it and checking out a few other Ruby-based engines like nanoc, I went all in with Jekyll and learned to love it. However, the thing that made it all worth it was git integration.
I knew what git was used for in a tech company/startup sense for working on projects, but I never realized you could use it to run a whole website. I tried to use some of the desktop clients out there for git, but the command line interface always made the most sense to me, and so I use it exclusively. Combined with the features of Jekyll, it makes editing my site and uploading posts very straightforward. For example: I can have Jekyll serve up a localhost session of the site that automatically updates when changes are made to markdown or CSS files. Then I commit my changes and keep track of what I’m doing to my local git repository. Once everything looks good I just push my changes to the master branch on the remote git repo on my server. The best part is the post-receive hook that builds the site server-side, so all I have to worry about is pushing changes and don’t have to install any dependencies on the local machine. I can literally walk up to any internet connected machine with shell access, pull down a copy of my site from the remote repository, write a post or add something to the site, push it all up and be done with it. I love this.
I set out to have this site act as a portfolio of sorts to showcase some of my design work, but really it’s more of a fun thing to do. Like I said earlier, I like websites. Oh, there’s an easter egg buried here somewhere too.
I usually use TextMate for making site changes and occasionally for writing posts. This post however was written in Markdown with iA Writer, which I really like for writing prose. Rarely I’ll make changes straight from the command line using vi (usually if I’m out and only have my phone). Speaking of vi, it’s quite frustrating to use when you type on a Dvorak keyboard layout. But I’ll save that for another post. Until then, thanks for reading.