When setting up a web site as described in chapter 11 of the Badger Book, you use a work area where three directories are particulary important.
Directory src
is where you put the templates that will
produce the actual HTML pages for the site. In general, each template
in this directory will produce exactly one HTML document.
When these templates are processed, they make use of library
templates and other tools that reside in the lib
directory.
Finally, the resultant HTML documents will be put in directory
html
.
Template::TT2Site supports this process in the following ways:
src
and lib
directories, and populates them with start data. The html
directory will be created automatically later. lib
directory, or from a library that Template::TT2Site
provides for you. Since in normal cases you will use many library
templates 'as is', you need only provide the templates that differ from
the standard version. html
using one simple command: tt2site. By default, tt2site setup creates the following
subdirectiories in src
:
src/images src/css
css
contains the style sheet for the site. As you
might guess, you can edit css/site.css
to change a number
of aspects of the look of your website.
You will also notice that an etc
directory has been
created, with a single file in it:
etc/ttree.cfgThis file is the configuration for the
ttree
processor
that is used internally by tt2site
. You shouldn't need to
modify this.
What you do need to modify are the files in the lib
directory:
lib/config/site lib/config/imagesThe standard library resides under the
lib
directory of
the Template::TT2Site installation. Its major subdirectories
are config
(configuration data), page
(page
formatting), and util
(utility functions).
For the time being, the contents of the files need to be taken as a guide how to write your own. Here is a short description of some files:
config/main
config/site
config/images
config/lang
page/wrapper
page/html
page/layout