Recipe Files
RecipeFiles tell Cook which chunks from the TiddlyWiki source tree get concatenated together to make a particular variant of TiddlyWiki. They are stored as UTF-8 text files.
RecipeFiles contain a sequence of statements from this list:
| Statement | Example | Purpose |
| <filename> | html/header.html | Include a copy of the specified file |
| @<label>@ | @prehead@ | Names a point in the output file for later reference |
| recipe: <filename> | recipe: ../../core/tiddlywiki.html.recipe | Process a sub-recipe file (which can be nested) |
| copy: <filename> | copy: images/field.jpg | Causes a specified external file to be copied alongside the cooked TiddlyWiki |
| <label>: <filename> | title: html/title.html | Include a copy of the specified file at the previously labelled point |
These simple operations permit quite complex patterns of sharing to be set up. The best way to see this in action is to look through the SourceTree. For example, here are the various recipe files that are used to generate tiddlywiki.com:
It starts with /verticals/tiddlywiki.com/index.html.recipe:
recipe: ../../core/tiddlywiki.html.recipe prehead: ../../core/html/rss.link.html title: html/title.html recipe: tiddlers/split.recipe recipe: images.recipe
First, it references /core/tiddlywiki.html.recipe for the basic core tiddlywiki in it's entirety, with labels to allow the insertion of custom content at various key points: "prehead", "title", "posthead", "prebody", "tiddler", and "postbody". After inserting the RSS link and the page title, it references two other recipes to do the rest of the work: one for the individual content tiddlers, and one with the copy statements for the required images.
/verticals/tiddlywiki.com/tiddlers/split.recipe (previously generated by Ginsu):
tiddler: AnotherExampleStyleSheet.tiddler tiddler: AutoSave.tiddler tiddler: Basque.tiddler ... tiddler: WikiWordEscape.tiddler tiddler: WritingStyle.tiddler tiddler: translations.tiddler
/verticals/tiddlywiki.com/images.recipe:
copy: images/brixhamharbour.jpg copy: images/field.jpg copy: images/forest.jpg copy: images/fractalveg.jpg