NAME
HTML::WebMake - a simple web site management system, allowing an entire site to be created from a set of text and markup files and one WebMake file.
SYNOPSIS
my $f = new HTML::WebMake::Main ();
$f->readfile ($filename);
$f->make();
my $failures = $f->finish();
exit $failures;
DESCRIPTION
WebMake is a simple web site management system, allowing an entire site to be created from a set of text and markup files and one WebMake file.
It requires no dynamic scripting capabilities on the server; WebMake sites can be deployed to a plain old FTP site without any problems.
It allows the separation of responsibilities between the content editors, the HTML page designers, and the site architect; only the site architect needs to edit the WebMake file itself, or know perl or WebMake code.
A multi-level website can be generated entirely from 1 or more WebMake files containing content, links to content files, perl code (if needed), and output instructions. Since the file-to-page mapping no longer applies, and since elements of pages can be loaded from different files, this means that standard file access permissions can be used to restrict editing by role.
Since WebMake is written in perl, it is not limited to command-line invocation; using the HTML::WebMake::Main
module directly allows WebMake to be run from other Perl scripts, or even mod_perl (WebMake uses use strict
throughout, and temporary globals are used only where strictly necessary).
METHODS
- $f = new HTML::WebMake::Main
-
Constructs a new
HTML::WebMake::Main
object. You may pass the following attribute-value pairs to the constructor.- force_output
-
Force output. Normally if a file is already up to date, it is not modified. This will force the file to be re-made.
- force_cache_rebuild
-
Force the cached metadata and dependency data for the site to be rebuilt. Normally this is used to speed up partial rebuilds of the site. This option implies
force_output
. - risky_fast_rebuild
-
Run more quickly, but take more risks. Normally, dynamic content, such as Perl sections, sitemaps, or navigation links, are always considered to be in need of rebuilding, as mapping their dependencies is often very difficult or impossible. This switch forces them to be ignored for dependency-tracking purposes, and so an output file that depends on them will not be rebuilt unless a normal content item on that page changes.
- base_href
-
Rewrite links to be absolute URLs based at this URL. By default, links are specified as relative wherever possible.
- base_dir
-
Generate output, and look for support files (images etc.), relative to this directory.
- paranoid
-
Paranoid mode; do not allow perl code evaluation or accesses to directories above the WebMake file.
- debug
-
Debug mode; more output.
- $f->set_option ($optname, $optval);
-
Set a WebMake option. Currently supported options are:
- $f->readfile ($filename)
-
Read and parse the given WebMake file.
- $f->readstring ($string)
-
Read and parse the given WebMake configuration (as a string).
- $f->make ()
-
Make all outputs, based on the WebMake files read earlier.
- $num_failures = $f->finish();
-
Finish with a WebMake object and dispose of its internal open files etc. Returns the number of serious failure conditions that occurred (files that could not be created, etc.).
MORE DOCUMENTATION
See also http://webmake.taint.org/ for more information.
SEE ALSO
webmake
ettext2html
ethtml2text
HTML::WebMake
Text::EtText::EtText2HTML
Text::EtText::EtHTML2Text
AUTHOR
Justin Mason <jm /at/ jmason.org>
COPYRIGHT
WebMake is distributed under the terms of the GNU Public License.
AVAILABILITY
The latest version of this library is likely to be available from CPAN as well as:
http://webmake.taint.org/