https://github.com/ioncache/plack-middleware-htmlify
Used for transforming a non-html document into html.
https://github.com/ioncache/plack-middleware-htmlify
Last synced: about 1 year ago
JSON representation
Used for transforming a non-html document into html.
- Host: GitHub
- URL: https://github.com/ioncache/plack-middleware-htmlify
- Owner: ioncache
- Created: 2010-09-08T21:39:24.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-10-06T22:05:28.000Z (over 15 years ago)
- Last Synced: 2024-04-15T00:16:39.709Z (almost 2 years ago)
- Language: Perl
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
NAME
Plack::Middleware::HTMLify - Transform a non-html page into html.
VERSION
version 0.1.1
SYNOPSIS
use Plack::Builder;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};
builder {
enable "HTMLify",
set_doctype => "...", # html for the doctype
set_head => "...", # html to include in
set_body_start => "...", # html for the beginning of the
set_body_end => "..."; # html for the end of the
$app;
};
DESCRIPTION
Plack::Middleware::HTMLify is meant to be used to transform non-html web
content into html.
Use case: On CPAN, the 'source' link is delivered as 'text/plain'. If
you wanted to do some post-processing of this page to add syntax
highlighting you would need the page to be set as 'text/html' and have
some basic HTML formatting.
SEE ALSO
Plack
AUTHOR
Mark Jubenville
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Mark Jubenville.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.