Introducing TiddlyWebPages
Since my last post, I've been hard at work on a new plugin, much larger in scope than my previous TiddlyWeb plugins. Before I start, you'll notice that my website has changed in look and feel quite considerably. Don't worry, the old site still exists at http://bengillies.net/.a/recipes/oldsite/tiddlers should you wish to see it.
So, onto the new plugin
It's called TiddlyWebPages (or tiddly-webpages).
Well, the new layout is built on new plugin. Makes sense right?
TiddlyWeb is a great server side, and with TiddlyWebWiki installed, it allows you to create some great websites pretty quickly and easily. In fact, once everything's set up, you don't even need to log in to your server. You can create the site right there from the comfort of your browser. The problem comes when you don't want to use TiddlyWebWiki for your entire site. Maybe you don't want to use it at all, or maybe you just want a site that doesn't use Javascript, or a site that functions more like a normal one. Well, that's where TiddlyWebPages comes in. It allows you to rapidly create new HTML templates, and store them in tiddlers. These templates then fit together however you like, reusing different templates wherever and whenever you like, to create your site. You can then define custom URLs (again within Tiddlers) and tell TiddlyWebPages which template and which recipe you want to assign to which URL. You can even tell it to load different templates depending on which bag you're viewing.
Thanks
You can do that too. You just tell it which recipe you want that template to use, and include it in your other template wherever you want. Doesn't need a recipe? Uses the same recipe as the other template? That's not a problem either.
They don't. All templates are the same, they all use the same syntax, and you can view all of them on their own should you wish to. Likewise, you can include any template inside any other template too. In fact, this website makes heavy use of that very aspect. You can even reuse other people's templates as they're all automatically available on the web. Just copy them over into your TiddlyWeb instance.
I was just getting to that bit. You can create your own URLs much like you can create your own templates. URLs can be entered in a pattern format, allowing you to match with any bag or tiddler, and associate that with a recipe (yes, that means you can carry over said bag/tiddler into the recipe to create a dynamic recipe) and load all of it up in a template of your choosing. It even works with standard TiddlyWeb filters.
Yes.
I did, quite right. You can assign a custom template to load up for each bag or recipe. So if one recipe is your blog and one showcases your project work, you can use a different template as the default for each. Don't worry though, each template has an extension associated with it. You can still view any tiddler/bag/recipe using any template you like, just put the correct extension on the end.
Yes they work too. Remember the link to my old site (http://bengillies.net/.a/recipes/oldsite/tiddlers)? Notice the lack of extension on the end? Yes, that's because I told TiddlyWebPages to load up that recipe using TiddlyWebWiki. Likewise, you could set up a custom URL to use a different plugin, or even add a different plugin inside one of your templates should you so choose.
It's on GitHub. You can find it here together with a readme detailing how to use it properly.
Finally, if you have any problems, please let me know. I'm on Twitter @bengillies. I also read the TiddlyWeb Google group so if you post something there, I'll happily reply to it.
So, onto the new plugin
What new plugin?
It's called TiddlyWebPages (or tiddly-webpages).
What's with the new site layout?
Well, the new layout is built on new plugin. Makes sense right?
What's it all about?
TiddlyWeb is a great server side, and with TiddlyWebWiki installed, it allows you to create some great websites pretty quickly and easily. In fact, once everything's set up, you don't even need to log in to your server. You can create the site right there from the comfort of your browser. The problem comes when you don't want to use TiddlyWebWiki for your entire site. Maybe you don't want to use it at all, or maybe you just want a site that doesn't use Javascript, or a site that functions more like a normal one. Well, that's where TiddlyWebPages comes in. It allows you to rapidly create new HTML templates, and store them in tiddlers. These templates then fit together however you like, reusing different templates wherever and whenever you like, to create your site. You can then define custom URLs (again within Tiddlers) and tell TiddlyWebPages which template and which recipe you want to assign to which URL. You can even tell it to load different templates depending on which bag you're viewing.
That sounds pretty interesting
Thanks
But what if I want to include templates within other templates?
You can do that too. You just tell it which recipe you want that template to use, and include it in your other template wherever you want. Doesn't need a recipe? Uses the same recipe as the other template? That's not a problem either.
Ok, so how do these sub templates differ to normal templates?
They don't. All templates are the same, they all use the same syntax, and you can view all of them on their own should you wish to. Likewise, you can include any template inside any other template too. In fact, this website makes heavy use of that very aspect. You can even reuse other people's templates as they're all automatically available on the web. Just copy them over into your TiddlyWeb instance.
Sounds pretty cool. You mentioned something about URLs?
I was just getting to that bit. You can create your own URLs much like you can create your own templates. URLs can be entered in a pattern format, allowing you to match with any bag or tiddler, and associate that with a recipe (yes, that means you can carry over said bag/tiddler into the recipe to create a dynamic recipe) and load all of it up in a template of your choosing. It even works with standard TiddlyWeb filters.
Excellent, so I could have /stuff/bag_name/tiddler_name?
Yes.
You also mentioned something about default templates for bags and recipes?
I did, quite right. You can assign a custom template to load up for each bag or recipe. So if one recipe is your blog and one showcases your project work, you can use a different template as the default for each. Don't worry though, each template has an extension associated with it. You can still view any tiddler/bag/recipe using any template you like, just put the correct extension on the end.
So what about extensions provided by other plugins?
Yes they work too. Remember the link to my old site (http://bengillies.net/.a/recipes/oldsite/tiddlers)? Notice the lack of extension on the end? Yes, that's because I told TiddlyWebPages to load up that recipe using TiddlyWebWiki. Likewise, you could set up a custom URL to use a different plugin, or even add a different plugin inside one of your templates should you so choose.
Sounds great. Where can I get it?
It's on GitHub. You can find it here together with a readme detailing how to use it properly.
Finally, if you have any problems, please let me know. I'm on Twitter @bengillies. I also read the TiddlyWeb Google group so if you post something there, I'll happily reply to it.
Comments