NAME

HTTP::AppServer::Plugin::PlainHTML - Plugin for HTTP::AppServer that creates static html pages for a given set of database tables to make a website better accessable for search engine crawlers and drive SEO.

SYNOPSIS

  use HTTP::AppServer;
  my $server = HTTP::AppServer->new();
  $server->plugin('PlainHTML'
    JavaScriptURL => '/',
    Tables => {
      'table1' => {
        'url' => '^\/tab1\.html$',
        'title' => '...',
        'description' => '...',
      },
      'table2' => {
        'url' => '^\/tab2\.html$',
        'title' => '...',
        'description' => '...',
      },
    },  
  );

DESCRIPTION

Plugin for HTTP::AppServer that creates static html pages for a given set of database tables to make a website better accessable for search engine crawlers and drive SEO.

Pure AJAX driven sites sometimes have the problem that the content cannot be easily provided to search engine crawlers. This plugin dumps all content from specific database tables as semantic HTML for non-JavaScript clients, sich as crawlers. Whenever a JavaScript-enabled client accesses such a dump-page its forwarded to the actual homepage (which is then AJAX driven).

Plugin configuration

JavaScriptURL => URL

All HTML pages generated by the plugin contain a javascript code that forwards the browser to this URL. This is due to the fact of the intention of this module, see above.

Tables => hash

Tables contains an entry for every table that should be dumped. An entry may look like this:

  'table2' => {
    'url' => '^\/tab2\.html$',
    'title' => '...',
    'description' => '...',
  },

This means "table2" will be dumped as semantic HTML under the URL "/tab2.html".

Installed URL handlers

For each table there the plugin installs an URL handler.

Installed server properties

None.

Installed server methods

None.

SEE ALSO

HTTP::AppServer, HTTP::AppServer::Plugin

AUTHOR

Tom Kirchner, <tom@tkirchner.com>

COPYRIGHT AND LICENSE

Copyright (C) 2010 by Tom Kirchner

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.