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 · pub: Publish the website;
32
33 · clean: Clear built tree;
34
35 · grab: Grab a file as attachment or picture;
36
37 · ls: List content and properties;
38
39 · show: Show the compiled site in a web browser;
40
41 · help: Show this manual.
42
43 The manual of each sub-command is available in form of manpages or by
44 invoking it with the "--help" flag.
45
47 A new site can be initialized by running the "pft init" command inside
48 a directory. In this document such directory will be called ROOT.
49
50 The initialization command produces the following filesystem structure:
51
52 ROOT
53 ├── pft.yaml - Configuration file
54 ├── content
55 │ ├── attachments - Location for attachments
56 │ ├── blog - Root location for blog entries source files
57 │ ├── pages - Location for pages source files
58 │ ├── pics - Location for pictures lookup
59 │ └── tags - Location for tag pages source files
60 ├── build - Location of the built website
61 ├── inject - Content to bulk inject the online site root
62 └── templates - Location for templates
63
64 "pft.yaml": configuration file
65 The configuration file is created automatically by the "pft init"
66 command, and populated with sensible defaults. It is expected to be in
67 YAML format. For more information consult the manual of "pft init".
68
69 "content": files generated by the user
70 This is where your content is stored. The "pft edit" and "pft grab"
71 commands will add text and binary files respectively in the appropriate
72 subdirectories. The "pft make" command will scan the "content"
73 directory while building the website.
74
75 "build": where the built website is placed
76 The "pft make" command will place the HTML pages resulting from the
77 compilation in this directory. The "pft pub" command will publish what
78 here is contained. The "pft clean" command will erase it.
79
80 "inject": a place for auxiliary files
81 It's common practice to add files in the root directory of your online
82 website. The "pft make" command will add any arbitrary file which is
83 found in the "inject" directory to the "build" directory after
84 compilation.
85
86 A good use case for this feature is the ".htaccess" file used by the
87 Apache webserver. Another one is the picture you want to share on the
88 fly with your friend.
89
90 "templates": HTML templates for compilation
91 Each text entry in your "content" directory will be mapped by "pft
92 make" to an HTML file. The output is created by expanding the content
93 into the structure defined by a template file.
94
95 Multiple template files can be stored in the "template" directory. Some
96 default files installed by "pft init".
97
98 Among other things, the "pft.yaml" configuration defines which default
99 template page should be used for the site. Single content entries can
100 override this setting by declaring a different template name in their
101 header. More details about the header can be found in the "pft edit"
102 manual page. Templates are documented in the "pft make" manual page.
103
104
105
106perl v5.28.0 2018-07-14 PFT(1)