djsipe.com | Web Development

Code FaceAfter a few posts where I wanted to include code examples, I quickly became frustrated with the standard <pre> display that the folks at WordPress recommend. I looked for a plugin that worked well, but didn’t like what I was seeing. So at the prodding of my colleague, Pat Doran, I decided to roll my own plugin.

The result is my “Code Face” plugin. It uses the YUI JavaScript framework to scan your posts and replace specially tagged <pre> blocks with rich code syntax highlighting via the syntaxhighlighter utility. Ninety-nine percent of the plugin is written in JavaScript using the concept of progressive enhancement. That means that even if your readers have JavaScript turned off or are using a screen reader, the content of your post is still highly accessible.

Check it out and let me know what you think. I’d love to hear your comments.

Update: This version of Code Face is now on Github.  Hope to have an easier to use version update soon.

I wish I could say that getting my site converted over to actual blogging software was my new years resolution, but I’ve always found new years resolutions to be a little lame. Let’s just say I’ve been meaning to make the switch off of Drupal and onto WordPress for a while now and the turn of the calendar seemed as good a time as any.

Let me know what you think. I built this theme from scratch, so if you see anything weird going on let me know.

Posted in PSA | 3 Comments »

© 2012 Donald J. Sipe III | Powered by WordPress | RSS Feed