Blogging Archives

Blogging about blogging, how meta.

Adjacent Archive Links for WordPress

WordPress logoEver since I adopted the current design for my monthly archive pages (one that lists all my posts for that month by title, rather than paginated excerpts—Matt blogged about this approach back in the day), I’ve wanted a convenient way to page back and forth through my archives by month—without having to blindly hard-code links for $current_month−1 and $current_month+1. I discovered a few people asking for the same thing, and I found an out-of-date plugin that had attempted to accomplish it, so I decided to write my own from scratch, as part of my recent redesign. Here’s how it looks in context:

Screenshot of adjacent archive links
Screenshot of Adjacent Archive Links

Continue Reading »

Long overdue for a redesign

The last time Justinsomnia went under the knife was 2007, and the web has changed a lot since then. Allow me to impress this upon you with a single image. The graph below represents the percentage of mobile browser traffic to my blog over those last 5 years. Hello iPhone and Android users!

Percentage of all mobile traffic to Justinsomnia from November 2007 to October 2012
Mobile traffic from November 2007 to October 2012

In the span of a single year, mobile traffic jumped from almost nothing to nearly a third of my total traffic (before settling down around 15% this year). Given that there’s now a significant global audience of people browsing the web with smaller screens, I decided it was time to get up to speed on responsive web design. (If you’re in the same boat, I highly recommend checking out Apple’s developer docs on Configuring the Viewport. It was eye-opening.)

Continue Reading »

Redirect Editor plugin for WordPress

WordPress logoI was looking for a WordPress plugin to manage a list of post redirects, but what I found was a little over-engineered for my tastes. I just wanted a simple web-interface to something resembling an .htaccess file. So I built it. It’s called Redirect Editor, and it provides a single textbox to manage a list of redirects, one per line, consisting of a relative URL path to match and an absolute URL destination to redirect to, separated by a space, e.g.

/2012/09/old-post/ http://www.example.com/2012/09/new-post/

Blank lines and lines that start with # (hash) are ignored and can be used for spacing and comments.

Continue Reading »

How to set up a local copy of your WordPress blog

WordPress logoWhy might you want to do this?

  • To access your posts while you’re away from the internet (long flights, container ships, developing countries, etc.)
  • To compose posts with WordPress’ native editing and preview tools, rather than client blogging apps
  • To speed up the process of editing posts, because the internet where you are is very slow or very costly
  • Or perhaps some combination of the above…

This is how I managed to keep my blog up to date while I was “on the road” over the last year, even when I didn’t have access to the internet. As long as I had power (which was not always a given), I was able to compose drafts (usually in a text editor), edit photos (in GIMP), and then layout/revise posts (in my local copy of WordPress). When I was ready to publish, and had access to the internet, it was a trivial process of uploading the photos (via SSH), copy-and-pasting the text over, and pressing “Publish”.

In fact I found it so much faster to compose and revise posts locally, that I’ve continued to use this set up even after returning to fast internet connections. Think about how many times you’ve hit that “Save Draft” button and waited for WordPress to “return” so you could reload the post preview tab—and you probably understand what I mean.

The steps I describe are based on my past experience of setting up a local web development environment on my laptop. Of course I ran into a few gotchas along the way, so I documented the process here for future reference. I don’t necessarily recommend this approach for everyone, but I figured it might offer some interesting insight into how I do things.

Continue Reading »