pft make - Build the PFT website
pft make
This command builds all content within the ROOT/content directory into HTML form.
ROOT/content
The content will be first organized into an internal graph representation, so that each entry knows which other entries refer to it. Each node of the graph is then mapped on a HTML template, and and saved in the ROOT/build directory. During this process unresolved links are notified to the user via standard error.
ROOT/build
HTML templates must be stored in the ROOT/templates directory.
ROOT/templates
The template engine in use is Template::Alloy. In a nutshell, it allows to expand simple code blocks within a HTML (or text) skeleton, as for example in:
Template::Alloy
<title>[% site.title %]</title>
Loops and conditionals are also supported. See the Template::Alloy user manual for learning the supported mini-language.
A bunch of pre-defined, templates are installed by default during the initialization process (see pft-init(1)).
The output encoding depends on a configuration key in pft.yaml (see pft-init(1)). The template is expected to define the encoding in a proper way, that is by making use of the [% site.encoding %] key in the HTML header:
pft.yaml
[% site.encoding %]
<head> <meta http-equiv="content-type" content="text/html; charset=[% site.encoding %]"> ... </head>
The result of a build is a collection of HTML pages. Since a href links are relative, the generated site will work fine even if moved or copied remotely on another system (see pft-pub(1)).
a href
The pft make command will populate the ROOT/build directory.
Additional static data to inject in the resulting website can be placed in the ROOT/inject directory. This meets the common requirement of placing additional files in the root directory of online websites (typical case being the .htaccess file of Apache).
ROOT/inject
.htaccess
The pft-make(1) command will first attempt to hard-link the injected files, from ROOT/inject to ROOT/build. If this fails (e.g. because hard-links are not supported by the filesystem) soft-links are attempted. If nothing else succeeds, pft make will make a copy of each injected file.
Show this guide.
1 in case of option parsing failure.
2 if it was impossible to construct the filesystem tree.
3 in case of corrupt configuration.
pft(1), pft-gen-rss(1), pft-init(1)
To install App::PFT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PFT
CPAN shell
perl -MCPAN -e shell install App::PFT
For more information on module installation, please visit the detailed CPAN module installation guide.