pft-make - Man Page

Build the PFT website

Synopsis

pft make

Description

This command builds all content within the ROOT/content directory 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/build directory.  During this process unresolved links are notified to the user via standard error.

Templates and expansions

HTML templates must be stored in the ROOT/templates directory.

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::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 website

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 href links are relative, the generated site will work fine even if moved or copied remotely on another system (see pft-pub(1)).

Injected data

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).

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.

Options

--help

Show this guide.

Exit Status

See Also

pft(1), pft-gen-rss(1), pft-init(1)

Referenced By

pft(1), pft-edit(1), pft-grab(1), pft-show(1).

2024-07-18 perl v5.40.0 User Contributed Perl Documentation