Let me tell you how I reworked my website over the weekend.
First, I laid out the content that I wanted: Contact information, some projects, some miscellaneous writings and notes, and files to download. Also, a handful of things I used to put on my site have been replaced with online services, such as my bookmarks, pictures I've taken, and my blog.
Originally I wanted the site to be based around XML and XSLT with XML content providers producing the reusable components I was looking for. Unfortunately, the only Perl solution for this is AxKit, which never ceases to give me hell. Even the Debian packages, which usually work out of the box, caused me to have to set the LD_LIBRARY_PATH
variable if I wanted things to kind of work.
Alternatively, I started to look at the legendary Template Toolkit. While already familiar with TT's syntax and structure, I had never used it to build a heirarchy of documents. I read bits of Perl Template Toolkit, especially the chapter on Building a Complete Web Site Using the Template Toolkit, and was immediately prepared.
In a single night I set up my Template Toolkit-driven website to produce a slew of well-structured XHTML documents. I'd even written a few plugins to fetch RSS feeds with XML::RSS::TimingBot, fetch recent images from Flickr, and run the final page through HTML Tidy.
The only quirk so far is not being able to use a wrapper template since I generate the CSS document along with the HTML pages. Maybe I'll create two config files for ttree
(the command to process all the pages) -- one that uyses a wrapper and one that doesn't.
(Update: This problem was solved -- I simply hadn't looked hard enough at the book. Thanks, Dave!)
The theme of the site changes every day, using an interesting feature of Perl's random number generator:
srand( int( time() / 60 / 60 / 24 ) ); return { %constants, %{ $themes[ rand @themes ] } };
What? WHAT? Don't leave me hanging like that!Template Toolkit had allowed to
Re:Don't leave me hanging!
statico on 2005-05-18T14:23:31
Gah! Fixed.
The only quirk so far is not being able to use a wrapper template since I generate the CSS document along with the HTML pages. Maybe I'll create two config files for ttree (the command to process all the pages) -- one that uyses a wrapper and one that doesn't.
We deal with that problem (and its solution) in chapter 11. See page 415 "CSS and Other Non-HTML Pages".
Re:Creating CSS
statico on 2005-05-18T17:26:32
Fantastic. Exactly the solution I need. Thanks!