App-Aphra
view release on metacpan or search on metacpan
#!/usr/bin/perl
=head1 NAME
aphra - Simple static sitebuilder in Perl
=head1 SYNOPSIS
$ aphra build
=head1 DESCRIPTION
C<aphra> is a simple static sitebuilder written in Perl. It takes a directory
tree of input template, processes them using the Template Toolkit and outputs
a directory tree of expanded templates.
=head1 COMMANDS
C<aphra> has two command modes.
=over 4
=item B<build>
Examines the files in the input directory, processes them in various ways
and leaves the processed version in the output directory.
See most of the rest of this documentation for the gory details.
=item B<serve>
Starts a local HTTP server which serves the files currently in the
output directory.
You need to have L<App::HTTPThis> installed in order for this to work.
=back
=head1 OPTIONS
C<aphra> takes a number of command line options which alter the way that it
works.
=over 4
=item B<source>
The main directory that contains the input files. Any file that is found in
this directory will be processed and an equivalent output file will be
created in the B<target> directory. The default value for this option is "in".
$ aphra --source some/other/directory
=item B<fragments>
A directory that contains other templates which are used in the processing
of the source templates. For example, you might have a template in the source
directory called C<index.html.tt> which includes other templates called
C<menu.html.tt> and C<footer.html.tt>. These templates shouldn't be put in
the source directory (as they would then be processed and written to the
target directory, but if they are put in the fragments directory, they will
be found by the template processor. The default value for this option is
"fragments".
$ aphra --fragments some/directory/of/fragments
=item B<layouts>
A directory that contains templates which are used to control the layout of
the files which are produced. These are typically used with the C<WRAPPER>
directive in the Template Toolkit. There's really no difference in handling
the layouts and fragments directories, but I find it useful to keep the two
types of template separate. The default value for this option is "layouts".
$ aphra --layouts some/directory/of/layouts
( run in 1.722 second using v1.01-cache-2.11-cpan-97f6503c9c8 )