App-PFT

 view release on metacpan or  search on metacpan

bin/pft-edit  view on Meta::CPAN

I<Title> field. The purpose is to have a mnemonic file name, which is both
readable and convenient to handle.

The field can be manually changed in the header, and this will result in the
file name to be modified when the editor is terminated.

=item I<Tags>

A list of tags for the entry.

Tags can be specified one per line with a leading C<->:

    Tags:
    - chicken
    - tomato

=item I<Title>

The title of the entry, in human readable form.

=back

=head2 Links in content

Besides regular URLs, internal resources such as pages, blog entries and
imported images can be referenced by means of a special link syntax.

Upon compilation by L<pft-make(1)> the content is translated from Markdown
to HTML.  After this phase HTML elements such as C<E<lt>aE<gt>> and
C<E<lt>imgE<gt>> are scanned, and those links matching the special syntax
are resolved according to the rules described in this manual.

Links in the special syntax are in the form

    :kind:param/param/...

There is a number of accepted C<kind> keywords. The number and meaning of
each parameter C<param> depends on the specified C<kind>.  The slash (C</>)
symbol separates syntactically the various parameters.

=head3 Pictures with C<:pic:path/to/picture.jpg>

Picture references accept special links in the Markdown form

    ![alttext](:pic:filename)

or in the HTML form

    <img alt="alttext" src=":pic:filename"/>

A link like this will be resolved to a file named named I<filename> under
the C<I<ROOT>/content/pics> directory.  The name provided is used directly
for lookup, so it must be complete of file extension, if any.

The C<img> keyword allows for an arbitrary number of parameter, each of
which concurs to define the path of the picture.  In other words, the C</>
symbol will work as path separator regardless of the operating system.

HTML Example:

    <!-- ROOT/content/pics/test.png -->
    <img src=":pic:test.png"/>

Markdown Example:

    <!-- ROOT/content/pics/cars/golf.png -->
    ![](:pic:cars/golf.png)

=head3 URLs:

Regular URLs in C<E<lt>aE<gt>> tags accept the following special
prefixes:

=over

=item :page:I<pagename>

Resolve the link as the page having identified by C<pagename>.

=item :blog:date/I<yy>/I<mm>/I<dd>/I<slug>

Resolve the link as the blog entry published at date I<yy/mm/dd> and
having the slug I<slug>.

The I<slug> parameter is optional if only one entry was published in the
given date. The keyword C<date> can be shortened as C<d>.

=item :blog:back/I<N>

Only valid within a blog entry. The generated link refers to I<N + 1> blog
entries before the current one. The I<N> parameter is optional, and
defaults to zero (i.e. previous entry).

Examples:

    <a href=":blog:back/0">     (previous entry)

    <a href=":blog:back">       (equivalently, previous entry)

    <a href=":blog:back/1">     (before previous, two entries ago)

    <a href=":blog:back/5">     (six entries ago)

=item :web:I<service>/I<param>/I<param>/...

Generate an URL which points to a web site or service (e.g. search
In all other cases the B<--select> flag is silently ignored.

engines, or specialized website) and passes data on the query. A number of
valid values are supported for the  I<service> argument. The list of
I<param> arguments depend on the specific service.

Supported services:

=over

=item Duck Duck Go

C<:web:ddg/I<bang>/I<param>/I<param>/...>

Search query on the I<Duck Duck Go> search engine. The first parameter is
used for Duck Duck Go's I<Bang> syntax, and can be empty in order not to use
any Bang.

Example: search C<linux howto> on Duck Duck Go:

    :web:ddg//linux/howto



( run in 2.901 seconds using v1.01-cache-2.11-cpan-df04353d9ac )