1PFT-MAKE(1) User Contributed Perl Documentation PFT-MAKE(1)
2
3
4
6 pft make - Build the PFT website
7
9 pft make [options]
10
12 This command builds all content within your "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. The library is well
31 documented, so you may consult the relevant references for learning the
32 supported mini-language.
33
34 You may take advantage of the default templates which are installed by
35 default during the initialization process ("pft init"):
36
37 "default.html"
38 is a simple but reasonable template suitable for any page;
39
40 "dump_page.html"
41 is a test template which gets expanded with all the available
42 variables for each page. This constitutes a useful test, and a
43 reference for available keys if you want to build your own
44 template.
45
46 More default installed templates may be added in future.
47
48 If you are writing a template, keep in mind they are expected to be
49 encoded as by locale.
50
51 You are also encouraged to share your own templates: any help is
52 appreciated! Please encode your shared templates as utf-8.
53
54 The output website
55 The output encoding depends on a configuration key in "pft.yaml" (see
56 the manual of "pft init"). The template is supposed to define the
57 encoding in a proper way, that is by making use of the "[%
58 site.encoding %]" key in the HTML header:
59
60 <head>
61 <meta http-equiv="content-type"
62 content="text/html; charset=[% site.encoding %]">
63 ...
64 </head>
65
66 The result of a build is a group of relocatable HTML pages: pages are
67 referring each other via relative links. This means that the generated
68 site will work fine even if moved or copied remotely on another system.
69
70 Besides the generated site, the "ROOT/build" directory will also
71 contain links to everything under the "ROOT/inject". This meets the
72 common requirement of placing additional files in the root directory of
73 online websites (typical case being the ".htaccess" file of Apache).
74
76 --help
77 Show this guide
78
79
80
81perl v5.28.0 2017-09-25 PFT-MAKE(1)