NAME
App::Followme - Simple static web site maintenance
SYNOPSIS
use App::Followme::ConvertPage;
my $converter = App::Followme::ConvertPage->new($configuration);
$converter->run($directory);
DESCRIPTION
If there are any text files in the directory, they are converted into html files by substituting the content into a template. After the conversion the original file is deleted. Along with the content, other variables are calculated from the file name and modification date. Variables in the template are surrounded by double braces, so that a link would look like:
<li><a href="{{url}}">{{title}}</a></li>
The variables that are calculated for a text file are:
- body
-
All the content of the text file. Markdown is called on the file's content to generate html before being stored in the body variable.
- title
-
The title of the page is derived from the header, if one is at the front of the file content, or the filename, if it is not.
- time fields
-
The variables calculated from the modification time are:
weekday, month,
monthnum, day, year, hour24, hour, ampm, minute,
andsecond.
CONFIGURATION
The following parameters are used from the configuration:
- page_template
-
The path to the template used to create a page, relative to the top directory.
- text_extension
-
The extension of files that are converted to web pages.
LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>