NAME

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

SYNOPSIS

    use Cwd;
    use App::Followme::FolderData;
    my $directory = cwd();
    my $data = App::Followme::MarkdownData->new(directory => $directory);
    @filenames = $data->get_files();
    foreach my $filename (@filename) {
        # read and process file
    }

DESCRIPTION

This module contains the methods that build metadata values from a Markdown file. The markdown file is optionally preceded by a section containing Yaml formatted data.

METHODS

All data are accessed through the build method.

my %data = $obj->build($name, $filename);

Build a variable's value. The first argument is the name of the variable. The second argument is the name of the file the metadata is being computed for. If it is undefined, the filename stored in the object is used.

VARIABLES

The markdown metadata class can evaluate the following variables. When passing a name to the build method, the sigil should not be used.

$body

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.

$description

A one line sentence description of the content.

$title

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.

CONFIGURATION

The following parameters are used from the configuration:

extension

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.

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>