Daizu::Gen

Daizu::Gen is a default generator class.
Download

Daizu::Gen Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Geoff Richards
  • Publisher web site:
  • http://search.cpan.org/~geoffr/Daizu-0.3/lib/Daizu/Preview.pm

Daizu::Gen Tags


Daizu::Gen Description

Daizu::Gen is a default generator class. Daizu::Gen is a default generator class.This class, and subclasses of it, are responsible for deciding which URLs should be created (generated) from each file or directory in a working copy, and generating the output which will be served for those URLs. This class itself is used by default, but you can use a different generator class by setting the daizu:generator property to the name of a Perl class. If you set it on a file, it will affect only that file. If you set it on a directory then it will affect that directory and all its descendants, unless they themselves have a daizu:generator property.The name of the generator class used for each file and directory is stored in the generator column of the wc_file table in the database.When an object of a generator class is instantiated, it must be given a 'root file', which is the file on which the daizu:generator property was set (or a top-level file or directory, if no such property applies).This class creates URLs based on the daizu:url property, and the names of files and directories. The results will be similar to the URLs that the filesystem would have if they were served directly from a webserver. Files with names like _index.html (anything starting with _index followed by a dot) are special in that the filename will not appear as part of the URL. Instead the URL will end with a trailing slash (/).With this generator class only files generate URLs. Directories are ignored, except when a sitemap XML file is configured as described below.CONFIGURATIONThe only configuration information which this generator currently makes use of is the xml-sitemap element shown here: < config path="example.com" > < generator class="Daizu::Gen" > < xml-sitemap / > < /generator > < /config >The sitemap URL will be generated from the directory at the path indicated. It must be a directory, not a plain file. In this case, the sitemap is likely to have a URL like http://example.com/sitemap.xml.gz. You can give this URL to Google, or any other search engine which supports the sitemaps format, to help their robots find URLs on your website.The xml-sitemap element may an optional url attribute, which should be a relative or absolute URL at which to publish the sitemap file. Its default value is sitemap.xml.gz Requirements: · Perl


Daizu::Gen Related Software