Template-TT2Site
view release on metacpan or search on metacpan
lib/Template/TT2Site.pm view on Meta::CPAN
package Template::TT2Site;
use strict;
use vars qw($VERSION);
$VERSION = sprintf("%d.%02d", q$Revision: 1.46 $ =~ /(\d+)\.(\d+)/);
use strict;
=head1 NAME
Template::TT2Site - Create standard web sites with the Template Toolkit
=head1 SYNOPSIS
$ mkdir NewSite
$ cd NewSite
$ tt2site setup
... make your pages ...
$ tt2site build
... point your browser at html/index.html ...
C<tt2site> is just a wrapper program. C<tt2site setup> is equivalent
to C<perl -MTemplate::TT2Site -e setup>, and so on.
=head1 DESCRIPTION
B<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 I<The Badger Book>. The structure has been
slightly simplified for ease of use, and a couple of neat features are
added:
=over 4
=item *
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.
=item *
The necessary means are provided to create multi-language sites, where
each page gets a link to its translations.
=item *
The 'site.map' hash, required for site navigation, is created
automatically using minimal, position independent, directions.
=back
This module, B<Template::TT2Site>, provides the necessary methods to
setup and maintain a site. It is used by the wrapper program,
B<tt2site>.
For more information, see the
Web site: L<http://www.squirrel.nl/people/jvromans/tt2site/index.html>.
=head1 METHODS
The following methods are exported by default.
=over 8
=item B<setup>
Initialises a new site directory. This command must be run once before
you can do anything else.
=item B<build>
Run the C<ttree> application to update the site files.
=item B<rebuild>
Run the C<ttree> application to completely rebuild all site files.
=item B<clean>
Cleans the generated HTML files, and editor backup files.
=item B<realclean>
Cleans the generated HTML files, editor backup files, and all files
originally installed using the B<setup> command.
You'll be asked for confirmation before your files are removed.
=back
All other methods are for internal use only.
=head1 AUTHOR
Johan Vromans <jvromans@squirrel.nl>
=head1 COPYRIGHT
( run in 0.463 second using v1.01-cache-2.11-cpan-5511b514fd6 )