App::Followme::ConvertPage - Convert Markdown files to html
use App::Followme::ConvertPage; my $converter = App::Followme::ConvertPage->new($configuration); $converter->run($directory);
If there are any markdown 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. Markdown files are identified by their extension, which by default is 'md'.
Along with the content, other variables are calculated from the file name and modification date. Variables in the template are preceded by a sigil, most usually a dollar sign. Thus a link would look like:
The variables that are calculated for each markdown file are:
All the contents of the file, minus the title if there is one. Markdown is called on the file's content to generate html before being stored in the body variable.
The title of the page is derived from contents of the top header tag, if one is at the front of the file content, or the filename, if it is not.
The variables calculated from the modification time are:
monthnum, day, year, hour24, hour, ampm, minute, and
The url of the html file built from the Markdown file.
The following parameters are used from the configuration:
The name of the template file. The template file is either in the same directory as the configuration file used to invoke this method, or if not there, in the templates subdirectory.
The extension of files that are converted to web pages. The default value is md.
The remaining parameters are passed unchanged to Text::Markdown. You should not need to change them.
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bernie Simon <firstname.lastname@example.org>