I've spent a lot of hours over the weekend stripping out markup on my personal website, so that I can regenerate it from a templating system.
My template-compiler is horribly hacky, but it produces reasonably good results from simple input files. The only motivation for this was to finally transition my site to a consistant layout, and allow me to easily change the layout again in the future.
I looked over WML, htmlpp, and a few other static web-compilers before writing my own tiny processor. I guess most of them are more powerful than mine, but similarly more complex to get started with.
I'll share the code if there is any interest. (Primarily it is template expansion of a body, optional per-page menus, and per-page HTML header inclusion.)
The only significant thing that has changed in my website is a tiny RSS feed of updates (also compiled!) and the removal of many sections from the top-level menu. (For example my body piercing section has been obsolete for years. It is still present, but I see no point in advertising it. Better resources exist..
The plus side is that I've managed to do all this whilst watching "Dead Like Me" over the Easter weekend. Both series from start to finish. Good show..
Obquote: 10 Things I Hate About You
Tags: css, templating, tv, websites 4 comments
What do you need in terms of templating? I started a template engine a while back because I couldn't find one that was GPL compatible, callable from C, and implemented for loops.
It's still far from stable, but you might want to check it out. http://misc.guifications.org/trac/wiki/gplate/. Right now it's just the library, but you could probably easily write a wrapper around it. It doesn't have a whole lot of functionality, but include and variable substitution sound like they might be enough. Note for loops are also working right now.
At any rate, if you check it out let me know, always looking for suggestions ;)