App-PFT

 view release on metacpan or  search on metacpan

bin/pft  view on Meta::CPAN

directory while building the website.

=head2 C<build>: where the built website is placed

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

=head2 C<inject>: a place for auxiliary files

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

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

=head2 C<templates>: HTML templates for compilation

Each text entry in your C<content> directory will be mapped by
L<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 C<template> directory. Some
default files installed by L<pft-init(1)>.

Among other things, the C<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 L<pft-edit(1)>
manual page. Templates are documented in the L<pft-make(1)> manual page.

=head1 SEE ALSO

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

=cut

use strict;
use warnings;
use warnings qw(FATAL utf8);

use utf8;
use v5.16;

use App::PFT;

use FindBin;
use File::Spec::Functions;
use File::Basename qw/basename/;

use Pod::Usage;
use Pod::Find qw/pod_where/;

use Encode;
use Encode::Locale;

$_ = decode(locale => $_) foreach @ARGV;
binmode STDIN, ':encoding(console_in)';
binmode STDOUT, ':encoding(console_out)';
binmode STDERR, ':encoding(console_out)';
$0 = basename $0;

my $subcmd = shift @ARGV;
unless (defined $subcmd) {
    print STDERR "Usage: $0 <command> [<args>]\n",
                 "Usage: $0 --help\n";
    exit 1;
} elsif ($subcmd =~ /^(?:version|-v|--version)$/) {
    say STDERR $App::PFT::VersionString;
    exit 0
} elsif ($subcmd =~ /^(?:help|-h|--help)$/) {
    @ARGV and do {
        print STDERR "Did you mean `$0 $ARGV[0] --help`?\n";
        exit 1
    };
    pod2usage
        -exitval => 1,
        -verbose => 2,
        -input => pod_where({-inc => 1}, __PACKAGE__)
}
my $return = do catfile $FindBin::RealBin, $App::PFT::Name . '-' . $subcmd;
unless (defined $return) {
    print STDERR 'pft: ', $@, "\n" if $@;
    print STDERR 'pft: cannot run command ', $subcmd, ': ', $!, "\n" if $!;
    exit 1
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.578 second using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b6 )