NAME
Template::TT2Site - Create standard web sites with the Template Toolkit
SYNOPSIS
$ mkdir NewSite
$ cd NewSite
$ tt2site setup
... make your pages ...
$ tt2site build
... point your browser at html/index.html ...
tt2site
is just a wrapper program. tt2site setup
is equivalent to perl -MTemplate::TT2Site -e setup
, and so on.
DESCRIPTION
Template::TT2Site is a framework to create web sites using the Template Toolkit.
The technical structure of the site is patterned after the method described in chapter 11 of The Badger Book. The structure has been slightly simplified for ease of use, and a couple of neat features are added:
The resultant site is position independent, i.e., it only uses relative URLs to the extent possible. This makes it easy to build partial sites, and to relocate the contents.
The necessary means are provided to create multi-language sites, where each page gets a link to its translations.
The 'site.map' hash, required for site navigation, is created automatically using minimal, position independent, directions.
This module, Template::TT2Site, provides the necessary methods to setup and maintain a site. It is used by the wrapper program, tt2site.
For more information, see the Web site: http://www.squirrel.nl/people/jvromans/tt2site/index.html.
METHODS
The following methods are exported by default.
- setup
-
Initialises a new site directory. This command must be run once before you can do anything else.
- build
-
Run the
ttree
application to update the site files. - rebuild
-
Run the
ttree
application to completely rebuild all site files. - clean
-
Cleans the generated HTML files, and editor backup files.
- realclean
-
Cleans the generated HTML files, editor backup files, and all files originally installed using the setup command.
You'll be asked for confirmation before your files are removed.
All other methods are for internal use only.
AUTHOR
Johan Vromans <jvromans@squirrel.nl>
COPYRIGHT
This programs is Copyright 2004,2005, Squirrel Consultancy.
This program is free software; you can redistribute it and/or modify it under the terms of the Perl Artistic License or the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
DEPENDENCIES
Template::TT2Site requires the following Perl modules, all available on CPAN:
Template::Toolkit, version 2.13 (preferrably 2.14) or later.
Template::TT2Site uses the ttree tool, which is assumed to be available in your execution path as a Perl script.
AppConfig. This is used by the ttree tool.
BUGS AND PROBLEMS
This product is better than this documentation.
AUTHOR AND CREDITS
Johan Vromans (jvromans@squirrel.nl) wrote this software.
Many things were borrowed and adapted from the Template Toolkit sample materials and the Badger book.
Web site: http://www.squirrel.nl/people/jvromans/tt2site/index.html.
COPYRIGHT AND DISCLAIMER
This software is Copyright 2004-2005 by Squirrel Consultancy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.