25 Jul 2019 20:39:05 UTC
- Distribution: App-PFT
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- KwaliteeBus factor: 0
- License: gpl_3
- Perl: v5.6.0
- Activity24 month
- Download (42.8KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionDACAV Giovanni Simoniand 1 contributors
- Giovanni Simoni (dacav at openmailbox)
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- EXIT STATUS
- SEE ALSO
pft make - Build the PFT website
This command builds all content within the
ROOT/contentdirectory into HTML form.
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/builddirectory. During this process unresolved links are notified to the user via standard error.
HTML templates must be stored in the
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:
<title>[% site.title %]</title>
Loops and conditionals are also supported. See the
Template::Alloyuser 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:
<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 hreflinks are relative, the generated site will work fine even if moved or copied remotely on another system (see pft-pub(1)).
The pft make command will populate the
Additional static data to inject in the resulting website can be placed in the
ROOT/injectdirectory. This meets the common requirement of placing additional files in the root directory of online websites (typical case being the
.htaccessfile of Apache).
The pft-make(1) command will first attempt to hard-link the injected files, from
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.
1 in case of option parsing failure.
2 if it was impossible to construct the filesystem tree.
3 in case of corrupt configuration.