Say hello to my little friend! (theme validator) « home
posted on 21:07 - 06 September 2011 | posted by Lev

If you follow me on Twitter, you may have caught the fact that I said I was working on getting this site updated to the latest Theia over the weekend. If you're really perceptive, you will probably also notice I haven't done this yet. It isn't that I haven't worked on it much, but that there was a lot more to do with getting my theme up to par than I had expected.
Then I got a bright idea! :)
What if there was a cool tool in Theia that would tell you everything wrong with your theme?
So that's what I've been putting together in my free time both over the weekend and up until now. It's quite handy, if I may say so myself.
What the theme validator checks for the following:
- the listed package compatibility of the theme versus the version of Theia being run
- if any template files are missing
- if any CSS files are missing
- if any CSS classes are missing
- if any images being referred to in any of the CSS files don't exist
The last one there involves a bit of regular expression 'magic' to parse through any CSS files in the theme looking for url() and snags every image name and then checks to see if those files exist on the server. This one has proved to be highly invaluable for me since a lot of the time I'll just copy large chunks of CSS from theme to theme and forget about copying over images it refers to.
This tool will be available in the next package of Theia I wrap together and publish. :)






