-
Notifications
You must be signed in to change notification settings - Fork 11
Home
The new website structure requires Template Toolkit to be on your machine in order to run the ttree script. Depending on your setup you can acquire the script and follow the instructions from this link http://www.template-toolkit.org/download/.
Once you have the Toolkit installed you should be able to run the ttree script from Terminal, Command Prompt etc this should create a .ttreec file (hidden) in your home directory. You aren’t required to do anything to this file as it’s the websites config file that’s used for updating. The website/projects config file is located in the root of the repository (ttree.cfg).
When updating the website you want to update the files that live in the “src” folder(do NOT edit the files in the root of the repository manually as they will be overwritten by the tool). This folder contains the source content for the site. In each file you will see tags which refer to the various template files the page needs to render successfully when ttree is run (i.e. [% INCLUDE header %]). More information on the template structure can be found at this link http://www.template-toolkit.org/docs/tutorial/Web.html.
When you have made the updates and you wish to render and run ttree, make sure you are in the websites git repository and type ttree -f ttree.cfg. The ttree.cfg file contains the relative paths to the src, lib and destination folders. When run successfully you should see a summary of what files have been processes, copied, linked or skipped.
Once updated, review commit details and proceed to commit as usual. Updates will be reflected on the live site in a few mins(~5 mins)
*Please note If a template has been processed previously, ttree will compare the modification times of the source and destination files. If the source template (or one it is dependant on) has not been modified more recently than the generated output file then ttree will not process it. The -a (all) option can be used to force ttree to process all files regardless of modification time.
$ tree -a