NAME

pft - Hacker friendly static blog generator

SYNOPSIS

pft <command> [options]

DESCRIPTION

PFT It is a static website generator written in Perl. PFT stands for Plain F. Text, where the meaning of F is up to personal interpretation. Like Fancy or Fantastic.

Static means that your content is compiled once and the result can be served by a simple HTTP server, without need of server-side dynamic content generation. Actually it doesn't need a server either: you can use it as note-taking application and browse trough your local files.

PFT is designed to be Hacker Friendly: it's a command-line application with unicode support, which handles your website's boilerplate, but stays out of the way. It comes with number of subcommands:

  • init: Initialize a pft site in the current directory;

  • edit: Create a content text (e.g. page or blog entry);

  • make: Build the website;

  • gen-rss: Generate RSS feed XML;

  • pub: Publish the website;

  • clean: Clear built tree;

  • grab: Grab a file as attachment or picture;

  • ls: List content and properties;

  • show: Show the compiled site in a web browser;

  • help: Show this manual.

The manual of each sub-command is available in form of manpages or by invoking it with the --help flag.

FILES

A new site can be initialized by running the pft init command inside a directory. In this document such directory will be called ROOT.

The initialization command produces the following filesystem structure:

    ROOT
    |-- pft.yaml            - Configuration file
    |-- content
    |   |-- attachments     - Location for attachments
    |   |-- blog            - Root location for blog entries source files
    |   |-- pages           - Location for pages source files
    |   |-- pics            - Location for pictures lookup
    |   `-- tags            - Location for tag pages source files
    |-- build               - Location of the built website
    |-- inject              - Content to bulk inject the online site root
    `-- templates           - Location for templates

pft.yaml: configuration file

The configuration file is created automatically by the pft-init(1) command, and populated with sensible defaults. It is expected to be in YAML format. For more information consult the manual of pft init.

content: files generated by the user

This is where your content is stored. The pft-edit(1) and pft-grab(1) commands will add text and binary files respectively in the appropriate subdirectories. The pft-make(1) command will scan the content directory while building the website.

build: where the built website is placed

The pft-make(1) command will place the HTML pages resulting from the compilation in this directory. The pft-pub(1) command will publish what here is contained. The pft-clean(1) command will erase it.

inject: a place for auxiliary files

It's common practice to add files in the root directory of your online website. The pft-make(1) command will add any arbitrary file which is found in the inject directory to the build directory after compilation.

A good use case for this feature is the .htaccess file used by the Apache webserver.

templates: HTML templates for compilation

Each text entry in your content directory will be mapped by pft-make(1) to an HTML file. The output is created by expanding the content into the structure defined by a template file.

Multiple template files can be stored in the template directory. Some default files installed by pft-init(1).

Among other things, the pft.yaml configuration defines which default template page should be used for the site. Single content entries can override this setting by declaring a different template name in their header. More details about the header can be found in the pft-edit(1) manual page. Templates are documented in the pft-make(1) manual page.

SEE ALSO

pft-clean(1), pft-edit(1), pft-gen-rss(1), pft-grab(1), pft-help(1), pft-init(1), pft-ls(1), pft-make(1), pft-pub(1), pft-show(1)