Minimal theme for Sublime Text

Minimal theme, compatible with both Sublime Text 2 and 3.

Minimal theme, compatible with both Sublime Text 2 and 3.

My favourite workspace theme for Sublime Text is currently Minimal Dark. With its dark sidebar I find it significantly less distracting than the default theme.

Here’s how to get it:

  1. Use via Package Control to install Theme – Minimal.
  2. Go to Preferences > Settings – User.
  3. Add the following line to your Preferences.sublime-settings file: “theme”: “Minimal Dark.sublime-theme”,

My current colour scheme is Tomorrow Night, which is also available via Package Control.

Uploading media to old posts in WordPress backdates the file location

From the ashes of b2/cafelog

I first started using WordPress in 2003 not long after it had been forked from b2/cafelog. It was version 0.7, before they started using jazz-inspired code names for the releases.

  • There were no pages, only posts. Pages arrived in 2005, version 1.5 Strayhorn.
  • There was no plugin architecture: if you wanted to make changes to the functionality of the application then you had to edit the core files (and re-edit them every time you updated WordPress… which was all done manually, of course). Plugins arrived in 2004, version 1.2 Mingus.
  • There were no themes. Support for that also arrived in 2005, version 1.5 Strayhorn, and was greatly improved in 2010, version 3.0 Thelonious.

The media library was also very basic in those days. You actually had to add the absolute path of the media folder in your b2config.php file, like this: $fileupload_realpath = '/home/example/public_html/images';

Organize media into folders

The media library improved over the years but one thing I never got around to switching on was this one, now found in Settings > Media: “Organize my uploads into month- and year-based folders”. I kind of wish I had now, because I have nearly 3,680 images sitting loose in /wp-content.

As part of my site migration from blog.garethjmsaunders.co.uk to www.garethjmsaunders.co.uk/blog I am trying to plan the best way to move all these images into month- and year-based folders. If you have any thoughts please do leave them in the comments.

What I did discover, however, is that if I were to retrospectively upload an image today to the media library, say for a blog post dated 9 August 2007, WordPress will upload it to a directory for the month associated with the post (/wp-content/uploads/2007/08/) and not the month I actually uploaded it (May 2014).

However, the media library filter still lists the file as having been uploaded during May 2014.

According to this support ticket “#10752 Uploading new media to existing posts/pages backdates file location” this is a feature, not a bug. It would be rather nice if you could choose which convention it uses: I’d prefer to be able to filter images according to when the image was used on a post, rather than when I ‘fixed’ the image.

Workaround to get a /blog site on WordPress multisite

The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed

Last month I said that I would soon be redesigning and re-architecting my website, including this blog. It has now begun!

Losing the subdomains

Something I want to do is standardise the URLs used on the site. Once upon a time I had an idea of using subdomains for all my mini-sites, so

  • blog.garethjmsaunders.co.uk
  • blueprint.garethjmsaunders.co.uk
  • mahjong.garethjmsaunders.co.uk
  • psion.garethjmsaunders.co.uk

I got as far as setting up my blog on a subdomain and I changed my mind. (Or got lazy, I can’t remember now.) 11 years later I have now decided to bite the bullet and move from blog.garethjmsaunders.co.uk to garethjmsaunders.co.uk/blog. It’s potentially going to involve a lot of work (and a little .htaccess wrangling) but it will be worth it in the long run.

WordPress doesn’t like blog sites

My plan was to create a new sub-site called “blog” but when I set up a WordPress multisite installation on my local machine to test how this would all work I encountered an unexpected problem. When you try to create a new site called “blog” WordPress multisite returns this error message:

The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed

Ah!

Workaround

The workaround I worked out, however, is pretty simple:

  1. On the WordPress multisite default site, create a new page called “Blog”, with the URL of ‘/blog’. (On my localhost test site this has a URL of http://garethjmsaunders.shed/blog/.)
  2. In Settings > Reading set the posts page to be your new “Blog” page.
  3. Now import your blog into this site. (I imported it category by category, one at a time as I have a lot of posts.)

Of course, if you want your blog to use a different theme than the rest of the default site pages you will need to use a multiple theme plugin.

The cobbler’s shoes

Something that has been on my task list for the last few years has been to redesign and re-architect my website garethjmsaunders.co.uk. It has been a perfect case of the cobbler’s shoes: I’ve spent so much time making and fixing websites for other people that I’ve not had time (or energy) to do anything with my own.

Enough is enough. My last site design was in 2003, I think. That was over 10 years ago. In 2003 Internet Explorer 6 was the dominant web browser, the war in Iraq began, Concorde made its last commercial flight, Apple released Mac OS X Panther. A lot has happened in the years since then: web standards have been embraced, the mobile web is on the move, and table-based layouts are so retro!

Issues

The last time I built my site I hand-coded everything using 1st Page 2000 (how I loved that application) before eventually moving to Dreamweaver 4.0 as it automated asset-handling and rewrote paths more quickly than hand-coding everything. I had only just learned CSS 2 and was eager to put it into practice. My site still suffers from a very bad case of both ‘divitis’ and ‘classitis’.

And there’s not much room for expansion. When I created a mini-site to support my Blueprint CSS extras I couldn’t integrate it into my site. The same happened with my original SEC Calendar site.

And last but not least, there is a mild hotchpotch of URLs: a mix of sub-domains (blog.garethjmsaunders.co.uk) and directories (/mahjong, /psion, /writing).

The way forward

After a few months of procrastination and mulling things over, I now realise that I have a number of projects that I want to work on, but as each requires that my website be up to date it is now time to bite the bullet and re-architect.

My current plans:

  • Move to a new host.
  • Standardise URLs, which will also mean that after 11 years on a sub-domain this blog will move to www.garethjmsaunders.co.uk/blog.
  • Mobile-friendly sub-sites.
  • Use a content management system or two.
  • Delete a lot of content.

Having delayed this for a couple of years it will be good to finally get these ‘shoes’ fixed!

IA decisions in net magazine: why not match up the browser icons?

Since the net magazine rebrand a few months ago the projects section of the magazine, which is printed on a rougher paper to distinguish itself more easily from the glossier feature articles, often includes a handy guide to which browsers a particular technology supports.

The infographic shows desktop browser support on the left, mobile/tablet support on the right. But in the spirit of Steve Krug’s book Don’t me me think, the way it is currently laid out has me thinking too much. I want to know what their design reasoning is.

Here is an example from the current issue (May 2014), from an article on page 84 called “Slash design/build time with proportional RWD”:

List of desktop browser icons, in two columns: desktop on left, mobile on right

Why don’t the icons match up? This just makes me think too hard.

But whenever I see this it always makes me wonder why they have not matched up the icons. What is the order being shown here? It’s really not obvious to me. It’s not alphabetical, it’s not by version number, or popularity.

Why not simply show a comparison between desktop version and its comparable mobile version, and then any left over can be arranged at the bottom?

I often find myself thinking, “Okay, so this feature is supported from Chrome version 6 onwards, but from which version of mobile Chrome is this supported?” And then I have to go hunting for the Chrome icon on the right-hand list.

Why not match the icons up, like this?

...and relax! The top four icons are matched, leaving the unique browsers to fight it out at the bottom

…and relax! The top four icons are matched, leaving the unique browsers to fight it out at the bottom

That makes it much easier for me to read. My five year old Joshua thinks this makes more sense. What do you think?