View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Bernard Simon > App-Followme-1.06 > App::Followme::ConvertPage



Annotate this POD


View/Report Bugs
Module Version: 1.06   Source   Latest Release: App-Followme-1.92


App::Followme::ConvertPage - Convert Markdown files to html


    use App::Followme::ConvertPage;
    my $converter = App::Followme::ConvertPage->new($configuration);


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:

    <li><a href="$url">$title</a></li>

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 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, and second.


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 <>

syntax highlighting: