1PFT(1) User Contributed Perl Documentation PFT(1)
2
3
4
6 pft - Hacker friendly static blog generator
7
9 pft <command> [options]
10
12 PFT It is a static website generator written in Perl. PFT stands for
13 Plain F. Text, where the meaning of F is up to personal interpretation.
14 Like Fancy or Fantastic.
15
16 Static means that your content is compiled once and the result can be
17 served by a simple HTTP server, without need of server-side dynamic
18 content generation. Actually it doesn't need a server either: you can
19 use it as note-taking application and browse trough your local files.
20
21 PFT is designed to be Hacker Friendly: it's a command-line application
22 with unicode support, which handles your website's boilerplate, but
23 stays out of the way. It comes with number of subcommands:
24
25 • init: Initialize a pft site in the current directory;
26
27 • edit: Create a content text (e.g. page or blog entry);
28
29 • make: Build the website;
30
31 • gen-rss: Generate RSS feed XML;
32
33 • pub: Publish the website;
34
35 • clean: Clear built tree;
36
37 • grab: Grab a file as attachment or picture;
38
39 • ls: List content and properties;
40
41 • show: Show the compiled site in a web browser;
42
43 • help: Show this manual.
44
45 The manual of each sub-command is available in form of manpages or by
46 invoking it with the "--help" flag.
47
49 A new site can be initialized by running the "pft init" command inside
50 a directory. In this document such directory will be called ROOT.
51
52 The initialization command produces the following filesystem structure:
53
54 ROOT
55 |-- pft.yaml - Configuration file
56 |-- content
57 | |-- attachments - Location for attachments
58 | |-- blog - Root location for blog entries source files
59 | |-- pages - Location for pages source files
60 | |-- pics - Location for pictures lookup
61 | `-- tags - Location for tag pages source files
62 |-- build - Location of the built website
63 |-- inject - Content to bulk inject the online site root
64 `-- templates - Location for templates
65
66 "pft.yaml": configuration file
67 The configuration file is created automatically by the pft-init(1)
68 command, and populated with sensible defaults. It is expected to be in
69 YAML format. For more information consult the manual of "pft init".
70
71 "content": files generated by the user
72 This is where your content is stored. The pft-edit(1) and pft-grab(1)
73 commands will add text and binary files respectively in the appropriate
74 subdirectories. The pft-make(1) command will scan the "content"
75 directory while building the website.
76
77 "build": where the built website is placed
78 The pft-make(1) command will place the HTML pages resulting from the
79 compilation in this directory. The pft-pub(1) command will publish what
80 here is contained. The pft-clean(1) command will erase it.
81
82 "inject": a place for auxiliary files
83 It's common practice to add files in the root directory of your online
84 website. The pft-make(1) command will add any arbitrary file which is
85 found in the "inject" directory to the "build" directory after
86 compilation.
87
88 A good use case for this feature is the ".htaccess" file used by the
89 Apache webserver.
90
91 "templates": HTML templates for compilation
92 Each text entry in your "content" directory will be mapped by
93 pft-make(1) to an HTML file. The output is created by expanding the
94 content into the structure defined by a template file.
95
96 Multiple template files can be stored in the "template" directory. Some
97 default files installed by pft-init(1).
98
99 Among other things, the "pft.yaml" configuration defines which default
100 template page should be used for the site. Single content entries can
101 override this setting by declaring a different template name in their
102 header. More details about the header can be found in the pft-edit(1)
103 manual page. Templates are documented in the pft-make(1) manual page.
104
106 pft-clean(1), pft-edit(1), pft-gen-rss(1), pft-grab(1), pft-help(1),
107 pft-init(1), pft-ls(1), pft-make(1), pft-pub(1), pft-show(1)
108
109
110
111perl v5.32.1 2021-01-26 PFT(1)