Skip to content

Serve static files and Text::Xslate template files from document root with directory index

License

Notifications You must be signed in to change notification settings

karupanerura/p5-Plack-App-Directory-Xslate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Plack::App::Directory::Xslate - Serve static files and Text::Xslate template files from document root with directory index

SYNOPSIS

 # app.psgi
 use Plack::App::Directory::Xslate;
 my $app = Plack::App::Directory::Xslate->new({
   root => "/path/to/htdocs",
   xslate_opt  => +{ # Text::Xslate->new()
       syntax => 'TTerse',
   },
   xslate_param => +{
       hoge => 'fuga',
   },
   xslate_path => qr{\.tt$},
})->to_app;

DESCRIPTION

This is a static files and Text::Xslate template files server PSGI application with directory index a la Apache's mod_autoindex.

CONFIGURATION

  • root

      Document root directory. Defaults to the current directory.
    
  • xslate_opt

      Text::Xslate constructor option.
    
  • xslate_path : Regexp or CodeRef

      Allow Text::Xslate rendering path.
    
  • xslate_param : HashRef

      Text::Xslate rendering variables.
    

AUTHOR

Kenta Sato E<lt>karupa@cpan.orgE<gt>

SEE ALSO

Plack::App::Directory Plack::App::File Plack::App::Xslate

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

About

Serve static files and Text::Xslate template files from document root with directory index

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages