1PFT-MAKE(1) User Contributed Perl Documentation PFT-MAKE(1)
2
3
4
6 pft make - Build the PFT website
7
9 pft make
10
12 This command builds all content within the "ROOT/content" directory
13 into HTML form.
14
15 The content will be first organized into an internal graph
16 representation, so that each entry knows which other entries refer to
17 it. Each node of the graph is then mapped on a HTML template, and and
18 saved in the "ROOT/build" directory. During this process unresolved
19 links are notified to the user via standard error.
20
21 Templates and expansions
22 HTML templates must be stored in the "ROOT/templates" directory.
23
24 The template engine in use is "Template::Alloy". In a nutshell, it
25 allows to expand simple code blocks within a HTML (or text) skeleton,
26 as for example in:
27
28 <title>[% site.title %]</title>
29
30 Loops and conditionals are also supported. See the "Template::Alloy"
31 user manual for learning the supported mini-language.
32
33 A bunch of pre-defined, templates are installed by default during the
34 initialization process (see pft-init(1)).
35
36 The output website
37 The output encoding depends on a configuration key in "pft.yaml" (see
38 pft-init(1)). The template is expected to define the encoding in a
39 proper way, that is by making use of the "[% site.encoding %]" key in
40 the HTML header:
41
42 <head>
43 <meta http-equiv="content-type"
44 content="text/html; charset=[% site.encoding %]">
45 ...
46 </head>
47
48 The result of a build is a collection of HTML pages. Since "a href"
49 links are relative, the generated site will work fine even if moved or
50 copied remotely on another system (see pft-pub(1)).
51
52 Injected data
53 The pft make command will populate the "ROOT/build" directory.
54
55 Additional static data to inject in the resulting website can be placed
56 in the "ROOT/inject" directory. This meets the common requirement of
57 placing additional files in the root directory of online websites
58 (typical case being the ".htaccess" file of Apache).
59
60 The pft-make(1) command will first attempt to hard-link the injected
61 files, from "ROOT/inject" to "ROOT/build". If this fails (e.g. because
62 hard-links are not supported by the filesystem) soft-links are
63 attempted. If nothing else succeeds, pft make will make a copy of each
64 injected file.
65
67 --help
68 Show this guide.
69
71 · 1 in case of option parsing failure.
72
73 · 2 if it was impossible to construct the filesystem tree.
74
75 · 3 in case of corrupt configuration.
76
78 pft(1), pft-gen-rss(1), pft-init(1)
79
80
81
82perl v5.30.0 2019-07-25 PFT-MAKE(1)