pft-make man page

pft make — Build the PFT website


pft make [options]


This command builds all content within your "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. The library is well documented, so you may consult the relevant references for learning the supported mini-language.

You may take advantage of the default templates which are installed by default during the initialization process ("pft init"):

is a simple but reasonable template suitable for any page;
is a test template which gets expanded with all the available variables for each page. This constitutes a useful test, and a reference for available keys if you want to build your own template.

More default installed templates may be added in future.

If you are writing a template, keep in mind they are expected to be encoded as by locale.

You are also encouraged to share your own templates: any help is appreciated! Please encode your shared templates as utf-8.

The output website

The output encoding depends on a configuration key in "pft.yaml" (see the manual of "pft init"). The template is supposed to define the encoding in a proper way, that is by making use of the "[% site.encoding %]" key in the HTML header:

<meta http-equiv="content-type"
      content="text/html; charset=[% site.encoding %]">

The result of a build is a group of relocatable HTML pages: pages are referring each other via relative links. This means that the generated site will work fine even if moved or copied remotely on another system.

Besides the generated site, the "ROOT/build" directory will also contain links to everything under the "ROOT/inject". This meets the common requirement of placing additional files in the root directory of online websites (typical case being the ".htaccess" file of Apache).


Show this guide