mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-27 10:30:28 +00:00
47 lines
2.4 KiB
Plaintext
47 lines
2.4 KiB
Plaintext
title: RecipeFiles
|
|
modifier: JeremyRuston
|
|
|
|
{{{.recipe}}} files are text files that list the components to be assembled into a TiddlyWiki. They link to a simple template file that contains the basic structure of the TiddlyWiki document with additional markers to identify parts of the file where ingredients are inserted. Recipes determine which tiddlers should be included in the file, and put together the individual JavaScript files making up the TiddlyWiki core code.
|
|
|
|
Each line of the recipe file is either a comment starting with `#` or lists an ingredient, prefixed with a tag that describes what to do with the ingredient. Tags either identify a marker within the template file or are special tags that initiate an action.
|
|
|
|
Recipe files contain lines consisting of a marker, a colon and the pathname of an ingredient:
|
|
{{{
|
|
marker: filepath
|
|
}}}
|
|
The filepath is interpreted relative to the directory containing the recipe file. The filename can contain the `*` wildcard character, for example:
|
|
{{{
|
|
tiddler: ../content/*.tid
|
|
}}}
|
|
You can use filepaths or URLs to reference recipe files and tiddlers. For example, this recipe cooks the latest TiddlyWiki components directly from the online repositories:
|
|
{{{
|
|
# Get the recipe direct from GitHub
|
|
recipe: https://raw.github.com/TiddlyWiki/tiddlywiki/master/tiddlywikinonoscript.html.recipe
|
|
tiddler: http://tiddlywiki-com.tiddlyspace.com/bags/tiddlywiki-com-ref_public/tiddlers.json?fat=1
|
|
tiddler: http://tiddlywiki-com.tiddlyspace.com/bags/tiddlywiki-com_public/tiddlers.json?fat=1
|
|
}}}
|
|
The special marker {{{recipe}}} is used to load a sub-recipe file.
|
|
|
|
The special marker {{{template}}} is used to identify the HTML template. The HTML template contains markers in one of two alternative forms:
|
|
{{{
|
|
<!--@@marker@@-->
|
|
<!--@@marker@@-->
|
|
}}}
|
|
The special marker {{{title}}} is automatically filled in with a plain text rendering of the WindowTitle tiddler.
|
|
|
|
The special marker {{{tiddler}}} is used for the main content tiddlers that will be encoded in TiddlyWiki {{{<DIV>}}} format.
|
|
|
|
The special marker {{{copy}}} is used to indicate files that should be copied alongside the finished TiddlyWiki file.
|
|
|
|
Tiddler fields can be overridden by following an ingredient with a set of indented fields:
|
|
{{{
|
|
tiddler: ../js/myscript.js
|
|
title: MyScript
|
|
modifier: JoeBloggs
|
|
tiddler: ../js/myoldscript.js
|
|
title: MyOldScript
|
|
tags: [[one long one]] Short
|
|
}}}
|
|
Note that if tags are applied in this way they completely replace any previous tags on the tiddler.
|
|
|