On Monday, March 28, Stefan Adams wrote:
> TMTOWTDI

Another way would be with a handler:

  app->renderer->add_handler( 'md' => sub {
    my ($r, $c, $out, $opts) = @_;
    $$out = Text::Markdown->new->markdown(
            Mojo::Util::slurp($r->template_path($opts)))
  } );

  get 'readme';

(though this would look for templates/readme.html.md)

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to