TiddlyTemplating – using TiddlyWiki to create webpages

I’ve been thinking quite a lot recently about TiddlyWiki as a development platform. I’m talking about using TiddlyWiki in your browser to make web applications, whether or not they’re ultimately delivered client-side or server-side.

The simplest form of this is the output of static webpages, which is something that TiddlyWiki kind of does already in the form of saving itself and its RSS feed. If we extend this idea slightly and use TiddlyWiki to manage the layout and content of any webpage, then there’s suddenly a whole new market we’re opening TiddlyWiki up to. Couple this TiddlyWiki with a server (e.g. TiddlySpot) and you’ve got a simple way to manage and publish your website. Bingo.

Using TiddlyWiki to run a website or a blog often comes up on the TiddlyWiki Google Group, and is a sore area because TiddlyWiki doesn’t play so well with search engines (what with all that Javascript and funky data-storage formats). The SEOTiddlyWikiPlugin went some way to fix this by outputting static pages and creating all the nice sitemaps that search engines like.

To control what you end up creating, the first thing that comes to mind is templating. There are a few Javascript templating engines out there. But TiddlyWiki comes with a huge templating engine built right into the middle – the wikifier! This is the guts that takes wikitext and pumps it out as html (or indeed whatever the chosen formatter tells it to). So if we have a template written in wikitext, and we use macros to fill in content (such as the “view macro”, which is the method used in tiddler templates), then with a little tweaking to make sure the right data is accessible at the right time, we’ve got ourselves a basic TiddlyTemplating prototype.

Check it out, creating an RSS feed, here. The source is in subversion (you’ll want Cook to compile – the docs for this are very thin on the ground, get in touch if you need a hand with this).

See if you think the syntax for the templating makes sense. I’ve attempted to keep the presentation logic entirely away from the application logic, so that someone messing with the template can’t break the application.

Advertisements

One Comment

  1. Kelley Bowen
    Posted November 12, 2008 at 10:44 pm | Permalink

    7gluplujad06voy2


2 Trackbacks/Pingbacks

  1. […] to post HTML files and string to a end point where the file is uploaded. This is a part of his template’s work and some SEO  work which will naturally fall out from it, that however the topic of a completely […]

  2. […] http://jaybyjayfresh.com/2008/01/23/tiddlytemplating-using-tiddlywiki-to-create-webpages/ […]