#!/usr/bin/perl
use strict;
use warnings;
use utf8;
#$MOJO_HOME/etc/plugins/markdown_renderer.conf
#Default configuration for Ado::Plugin::MarkdownRenderer
{ md_renderer => 'Text::MultiMarkdown',
#Can be a method name or CODEREF.
#First paramether is the md_renderer instance and
#the second is the markdown text
md_method => 'markdown',
#md_method => sub {shift->markdown(shift)},
#These options will be passed to the md_renderer constructor
md_options => {use_wikilinks => 1,},
#Where the files reside?
md_root => app->home->rel_dir('public/doc'),
md_file_sufixes => ['.md'],
#Do not convert files everytime but reuse already produced html files.
md_reuse_produced_html => 1,
#Default helper name
md_helper => 'md_to_html',
#Default routes! Define additional routes in ado.conf/plugins/markdown_renderer[$i]/routes
routes => [
{ route => '/help/*md_file',
via => ['GET'],
to => {controller => 'Doc', action => 'show', md_file => 'bg/cover.md'},
},
],
};