What you will need
In order to make a local HTML copy of aTbRef you will need to download two ZIP files:
- The TBX source of aTbRef: http://www.acrobatfaq.com/atbref5/aTbRef.zip. The archive unpacks a single TBX file which can be moved anywhere and opening in Tinderbox.
- A Zip archive of the images to be used by the local website: http://www.acrobatfaq.com/atbref5/images.zip. The archive unpacks a single folder called 'images' containing all the images needed.
Set up the export location
Decide where you wish to create the website - even if you may subsequently move it. As the TBX file will remember the location after first use it makes sense to use the final location, if you know it. Create a new empty folder there. The exact name of the export folder doesn't matter - though you need to remember where it is for the export step in Tinderbox.
Place the 'images' folder inside your export folder, so it is ready for use once the HTML content has been exported.
Open the TBX
Find your downloaded aTbRef.tbx file and double click it to open it.
Decide whether you want :
- the full export - the default such as is used publicly online. You may want this in order so see how some of the non-content features like RSS or the version checker actually work. As the TBX is already configured for this, jump to the step: 'Export to HTML - 1' further below.
- an alternate export designed for use without web access, with various export features disabled. All the normal HTML content is still exported.
Configure for Local use export
Scroll the main outline and find the note close to the bottom, which is called 'EXPORT SET UP FOR WEB'. Open its text window.
Setting the export toggle
For local use, tick the box indicated. Note the note name is actually 'EXPORT SET UP' the rest of the screen name - as seen in the title bar and major views - is supplied via a display expression.
The note's text describes what the toggle actually controls.
Outline rest for local use
Note the changes in the outline, to remind you you are now in 'local' export mode. You are ready to export.
Export to HTML - 1
Ready to export in either mode? Open the File menu and select Export as HTML…
Export to HTML - 2
Use the chooser dialog to find your export folder and select it. If you forgot to make one - or can't find the one you made earlier - just use the New Folder button and make a new one.
Click Export to start the export process.
Data is exported
A progress bar is shown. You may find, due to the sheer amount of pages exported, the progress bar may reach the end a bit before the overal process completes.
If you use the full export with 'similar to' links in each page, the process takes quite a bit longer. Without, it is a few seconds. With, each page's content - once created - then has to be tested on the fly for similar links. Unsurprisingly this does take a bit longer!
Output as seen in Finder
This shows the full output. Items highlighted in yellow won't be created if using the local option.
Note the 'images' folder isn't created by the export - this is the folder you need to add from the downloaded Zip file.
N.B. The 'sitemap.xml' file export is also turned off by default in full export (as it is so big - more on this below).
Web page content missing in local mode
The local option leaves out from the exported HTML:
- the Google Translate widget (top right) as this loads direct from the web.
- the search function (towards the bottom) as this returns results from the Google website.
The other omissions for local use are unseen code in the page source.
Side-note: the 'similar notes' (box-out above) section is retained but can be manually turned off - see step 'Excluding 'similar to' links' below.
Further export tweaks
The TBX offers a few more easy controls for customising what is exported, albeit not controlled by the switch in the 'EXPORT SET UP' note.
Excluding 'similar to' links
Expand the 'TEMPLATES' container and open the text window for export template '5-basic_all'.
The 5-basic_all template
Un-tick the $UseSimilarTo attribute tick-box and the template will leave out these links when exporting, making the process much faster (albeit without these useful links!).
Leaving the links 'on' makes export much slower than the very fast results tinderbox normally gives. Why so? As every page must be evaluated on the fly for similar pages before the page can be created that adds to per-page production time. With over 2,500 pages in aTbRef this obviously has an impact. On the author's MacBook Pro, there is a x20 difference with/without the links. So, if you will be doing lots of repeat exports by way of experiment or testing, it's a good idea to leave this include out for now.
The Site Map exports
These notes aren't controlled by the web/local toggle and both export an outline of the whole content site.
The first is an HTML page with a link to each page in the main content, laid out in outline form. It is far too big a page for real-world use but shows the power of just 2 templates (envelope & letter method) being used to include pretty much every content note in the document. This page does export by default, not least as each normal HTML page includes a link to it in their navigation bar. To stop it being exported, open its text window and see the next step.
The second export is an experiment in making a 'sitemap.xml' file such Google can use to fine tune indexing of a website. As the XML is verbose and makes an 8MB (!) file, it does not export by default. If you want to turn it on, open its text window and follow the instructions as given for the HTML page in the next step.
aTbRef Site Map
Tick the box to stop export, un-tick to allow it.
If you wish to enable the sitemap.xml file, open its text window and use the same procedure (noting the defaults are different in each of the two items).
Moving the output
Can the website be moved once exported? Yes, absolutely. Either in web or local form, the site is self-contained and all in-site links are relative. To move the site around on your Mac, or to a different location on your LAN or web server, simply move the folder (to which you exported) with all of its contents to the new location.
Creative Commons Licence
The CC licence was added with regard to the content of the HTML site. Feel free to learn from and use the design and export mechanisms of the TBX without restriction.
The TBX contains, and exports, a Creative commons Licence to help anyone who wants to re-use the resource in a private organisational setting, e.g. a university LAN or such. You are free to:
Share - to copy, distribute and transmit the work
Remix - to adapt the work
…under the following conditions:
Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Please use this Attribution.
Non-commercial. You may not use this work for commercial purposes. The following Waivers are already granted.
Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
Please note that any of the above conditions can be waived if you get permission from the copyright holder.
Nothing in this license impairs or restricts the author's moral rights.
Feel free to experiment. If you really mess up the TBX, simply download a fresh copy. The file's exports are basically a series of exercises exploring what tinderbox can do with (HTML) export. Note that you don't have to export HTML. Indeed, the 'zipper' pages don't export a page at all - they just call the command line to make the desired zip files. The no-exporting notes have some information about them in their $Text as well as some coverage in the 'About aTbRef' section in the main content.
Should you delete the root note 'A Tinderbox Reference File' and its descendants, you've effectively got a blank vessel for experiment, albeit with some templates looking at user attributes created for the existing content. Generally such template content will result in no export code if the target attributes are not used so they can be left in situ for simple experimenting.
The zipper and Version Checker features are set to work on the author's system but these customisations are exposed as key attributes in the relevant notes. So, these features too, can be altered for your own use.