As can be seen by looking at the source TBX of aTbRef, it can be useful to place all 'content' i.e. the data you are working on and wish to export, inside one container. This also makes it easy for that container to form the index page of an HTML export or root element for XML export, etc. Thus "A Tinderbox Reference File" is the index.html file for this website. All notes used in the visible web content are descended from this note.
So what else might there be outside that? Looking at aTbRef's outline root you will find:
- /UTILS/. A variety of utility agents and the documents prototypes. Tip, set the prototypes' container's $OnAdd to
- /Boilerplate/. This holds some code-type notes with sections of code to be included in export templates. This makes the individual templates easier to maintain as boilerplate can be updated once for several different templates. The 'Code' prototype is often used for this type of note as usually it is important that the code's text is not modified by the export process, e.g. inserting HTML paragraph tags, etc. Tinderbox's built-in Code prototype is offered for just such a reason to save the user setting lots of attributes to non-default settings in 'code' notes.
- /Templates. All the export templates needed are stored here: HTML, RSS, etc. Tip, set the container's $OnAdd to
$IsTemplate=true; in aTbRef's case it is
$Prototype="_template", as that sets a prototype for which $IsTemplate is already correctly set.
- an HTML site map. An HTML nested listing of the entire content outline. Clearly, placing this inside the content section would not be a good fit, and opens issues of unintended recursion, so it lives outside the content.
- Version checkers. These export small code pages used to allow users who prefer to consume aTbRef in TBX form to check their local document is up to date. See more here and here.
- Atom and RSS feeds. See more.
- Zippers. These use command line code to create separate Zip files of the TBX and the /images/ folder (all images have always lived outside the TBX). The latter is needed if running out an HTML site locally and without web access. See more here and here.