Category: Wordpress

Using Google Webfonts with Thematic

A few weeks ago Google launched their Web Fonts Directory. All the fonts in the directory can be added to any web page with a few simple lines of Javascript; they can subsequently be used in CSS stylesheets just like regular fonts. Those with a keen eye for detail might have noticed some changes in the fonts around here. Now you know where they are from.

Here’s a simple snippet to add Webfonts support to your Thematic child themes. Just add it to the functions.php:

[gist id=467550]

Thematic: the final word in WordPress themes

Modular, Extensible

I’m a sucker for clean, well-designed code. I like modular, extensible architectures. I like change.

As a consequence, I struggle periodically with the theme of my website. Not that I am a designer and it is certainly not the most productive use of my time, but what can I say. The point is, I was never really happy with the infrastructure I had at my disposal (I am never happy with the designs that I come up with, so thats another story). Until now.

One of the main barriers in designing a custom theme is that you don’t want to scratch. It is just too much work, and why do it when so many others have already done all the hard work for you? It pays to be lazy! So I have always looked around for good starting points to build up custom themes on.

I started out with Sandbox, a semantically rich theme that allowed extensive customization just using CSS. However, styling via CSS can only get you so far. Sometimes you really do want to make changes to the underlying PHP, for instance.

My next setup involved a base copy of Sandbox on which I layered my changes. In order to accommodate changes to the underlying Sandbox code, I used Mercurial with patch queues (the mq extension). This was much nicer, since it was easy to keep up with changes to the core Sandbox and leverage the work that was being done by others. But it was still cumbersome, since once in a while I would run into conflicts that I would have to merge manually. And it was still not a clean setup.

My ideal setup would have been to keep my changes completely distinct and isolated from the underlying theme. A setup that would allow the underlying theme to evolve independently, while my changes continue to work without any additional work.

Thanks to improved support for child themes in WordPress 2.7, and some fantastic work done by these fine folk, I have realized this ideal setup.

You see, I recently started working on a new website for my wife (it is not live yet, but will be soon). In the process of building her website, I was exploring the so-called WordPress Theme Frameworks. After some playing around, I settled on using Thematic. I started out by cloning the Thematic repository. Locally, I was using git-svn to manage the code changes. Thanks to git-rebase, it was not that hard to keep my changes up-to-date relative to a rapidly evolving Thematic code base.

But soon enough, Thematic had enough hooks, filters and features that I could do all the modifications without modifying a single line of Thematic itself. Now, all my changes are contained entirely within a child theme. How it is possible? Well, Thematic happens to be pretty much the most child-theme friendly framework that I could find. It is really easy to customize.  Several child themes are already available for immediate use, and it is trivial to develop your own child theme.

This blog is going to run on a Thematic child theme. Changes are going to be incremental, but I don’t need to worry about keeping them in sync with Thematic, and I get to leverage the improvements being done in the core them for free! You can also take a sneak peak at how we are using Thematic for my wife’s new website

Still around

I was shocked to see how infrequently I’ve blogged since the [[|beginning of 2007]]. Maybe its good in a way — I had enough things to keep me busy in my real life that I didn’t have too much time for my online self. The past few weeks I was swamped with some paper deadlines. Now that those are done, I’m trying to catch up with the rest of my life, and eventually got around to poking with my blog again. A lot of other things have happened in the meantime and I’ll try to gradually cover them in subsequent posts.

Meanwhile, I have started hacking together my own theme on top of [[|K2]]. Right now I’m maintaining it has a set of [[|Mercurial]] [[|mq]] patches on top of the SVN-trunk of K2. So far its working out alright, we’ll see how it goes moving forward. The only major changes I’ve made so far are the new [[|Home]] page and some typographical tweaks. The Home page has two columns, and they support [[|widgets]] and K2 modules — so you can pretty much put arbitrary content in the columns. I also whipped up my own text widget, which would apply the content filters to the text — the default text widget outputs raw text, which I didn’t like. I want to be able to use my [[|WP-Dokuwiki]] plugin wherever possible.

I’m still trying to figure out fonts and color schemes. I’m so bad at color schemes, really! I’m really digging Adobe’s new online tool though — [[|Kuler]]. I’ll also beg/borrow/steal the features I like from some of the other really neat WordPress themes out there, like [[|Cutline]], [[|Squible]], [[|Redoable]] etc.

Finally, I know that I’m probably spending too much time unnecessarily on the look and feel of the blog. I’m not really a designer, so this is my attempt to fool myself into believing that I can atleast try. But I will start focusing on content very soon now.

WP-Dokuwiki 0.2

This is a major release, with some new features and bug fixes.

New Features:
* Support for multiple wiki tags.
* Enabled Javascript based toggling of ToC, as in Dokuwiki.
* Added interwiki link.
* Added acronym for SCM.
* Removed the template directory — this cuts down significantly on the size.
* Support for formatting of ‘urlextern’ links.

Get the tarball [[|here]].

Further details on installation, usage and older versions can be found on the [[|WP-Dokuwiki page]].