PFT-MAKE(1)

πŸ“¦
version 1.4.1 Β· 2 versions
, in fedora 43

pft-make(1) πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation corner of the universe β€” this is the manual for pft make, and yes it's giving main character energy, come sit with me 🫢


✨ NAME ✨

pft make β€” build the PFT website πŸ’…


🌸 SYNOPSIS 🌸

pft make

that's it. that's the whole vibe. no flags, no chaos, just the one command πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So this command takes literally all the content chillin' inside the ROOT/content directory and turns it into HTML. All of it. No cap.

First the content gets organized into an internal graph representation β€” think of it like a little friendship web, where every entry knows exactly which other entries refer to it πŸ‘‘. Then each node of that graph gets mapped onto an HTML template, and saved into the ROOT/build directory. During this whole glow-up process, any unresolved links get reported to you via standard error, so you're never left guessing πŸ™ˆ.

🧚 Templates and expansions 🧚

HTML templates must live in the ROOT/templates directory. That's their home, bestie, don't relocate them πŸ’œ.

The template engine in play here is Template::Alloy. In a nutshell (a very cute nutshell), it lets you expand simple code blocks inside an HTML (or text) skeleton, like for example:

<title>[% site.title %]</title>

Loops and conditionals are also supported, so you can go full goblin mode with logic if you want. Check the Template::Alloy user manual for the whole supported mini-language, iykyk ✨.

A bunch of pre-defined templates get installed by default during the initialization process (peep pft-init(1)) β€” so you're not starting from scratch, you're starting from slay πŸ’š.

πŸ’œ The output website πŸ’œ

The output encoding depends on a configuration key in pft.yaml (again, see pft-init(1)). The template is expected to define the encoding in a proper way β€” and by "proper way" we mean by making use of the [% site.encoding %] key in the HTML header, like so:

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

The result of a build is a collection of HTML pages. And here's the iconic part: since a href links are relative, the generated site will work fine even if it gets moved or copied remotely onto another system (see pft-pub(1)) πŸ¦‹. It's portable, it's flexible, it ate πŸ’….

πŸŽ€ Injected data πŸŽ€

The pft make command will populate the ROOT/build directory.

Got extra static data you wanna inject into the resulting website? Drop it in the ROOT/inject directory. This handles the super common requirement of placing additional files in the root directory of online websites β€” the typical case being the .htaccess file of Apache. Classic πŸ™ˆ.

Here's how the link situation goes down, in order, like a little priority list:

  1. The pft-make(1) command will first attempt to hard-link the injected files, from ROOT/inject to ROOT/build.
  2. If that fails (e.g. because hard-links are not supported by the filesystem), soft-links are attempted.
  3. If nothing else succeeds, pft make will make a copy of each injected file.

so basically it's gonna link you one way or another, bestie. it's persistent like that πŸ”₯.


πŸ’– OPTIONS πŸ’–

  • --help β€” show this guide. that's the one and only, and honestly? iconic minimalism.

πŸ’€ EXIT STATUS πŸ’€

  • 1 in case of option parsing failure. πŸ’€
  • 2 if it was impossible to construct the filesystem tree. 😭
  • 3 in case of corrupt configuration. πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! go build something gorgeous, you've got this πŸ«Άβœ¨πŸ’…

mwah πŸ’‹ β€” this was perl v5.42.0, dated 2025-07-25, signing off from the PFT-MAKE(1) chapter of the User Contributed Perl Documentation. periodt. πŸŽ€

πŸ“¦ where this page comes from