.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PFT-MAKE 1" .TH PFT-MAKE 1 2023-07-20 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME pft make \- Build the PFT website .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBpft make\fR .SH DESCRIPTION .IX Header "DESCRIPTION" This command builds all content within the \f(CW\*(C`ROOT/content\*(C'\fR directory into HTML form. .PP 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 \f(CW\*(C`ROOT/build\*(C'\fR directory. During this process unresolved links are notified to the user via standard error. .SS "Templates and expansions" .IX Subsection "Templates and expansions" HTML templates must be stored in the \f(CW\*(C`ROOT/templates\*(C'\fR directory. .PP The template engine in use is \f(CW\*(C`Template::Alloy\*(C'\fR. In a nutshell, it allows to expand simple code blocks within a HTML (or text) skeleton, as for example in: .PP .Vb 1 \& [% site.title %] .Ve .PP Loops and conditionals are also supported. See the \f(CW\*(C`Template::Alloy\*(C'\fR user manual for learning the supported mini-language. .PP A bunch of pre-defined, templates are installed by default during the initialization process (see \fBpft\-init\fR\|(1)). .SS "The output website" .IX Subsection "The output website" The output encoding depends on a configuration key in \f(CW\*(C`pft.yaml\*(C'\fR (see \&\fBpft\-init\fR\|(1)). The template is expected to define the encoding in a proper way, that is by making use of the \f(CW\*(C`[% site.encoding %]\*(C'\fR key in the HTML header: .PP .Vb 5 \& \& \& ... \& .Ve .PP The result of a build is a collection of HTML pages. Since \f(CW\*(C`a href\*(C'\fR links are relative, the generated site will work fine even if moved or copied remotely on another system (see \fBpft\-pub\fR\|(1)). .SS "Injected data" .IX Subsection "Injected data" The \fBpft make\fR command will populate the \f(CW\*(C`ROOT/build\*(C'\fR directory. .PP Additional static data to inject in the resulting website can be placed in the \f(CW\*(C`ROOT/inject\*(C'\fR directory. This meets the common requirement of placing additional files in the root directory of online websites (typical case being the \f(CW\*(C`.htaccess\*(C'\fR file of Apache). .PP The \fBpft\-make\fR\|(1) command will first attempt to hard-link the injected files, from \f(CW\*(C`ROOT/inject\*(C'\fR to \f(CW\*(C`ROOT/build\*(C'\fR. If this fails (e.g. because hard-links are not supported by the filesystem) soft-links are attempted. If nothing else succeeds, \fBpft make\fR will make a copy of each injected file. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-help\fR 4 .IX Item "--help" Show this guide. .SH "EXIT STATUS" .IX Header "EXIT STATUS" .IP \(bu 4 1 in case of option parsing failure. .IP \(bu 4 2 if it was impossible to construct the filesystem tree. .IP \(bu 4 3 in case of corrupt configuration. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBpft\fR\|(1), \fBpft\-gen\-rss\fR\|(1), \fBpft\-init\fR\|(1)