NAME
Web::Sitemap::Url - Sitemap URL representation
SYNOPSIS
use Web::Sitemap;
$sm = Web::Sitemap->new(%args);
# will produce Web::Sitemap::Url objects from strings
$sm->add(['/blog/1', '/blog/2']);
# will produce Web::Sitemap::Url objects from hashes (more configurable)
$sm->add([
{
loc => '/blog/3',
changefreq => 'daily',
},
{
loc => '/blog/4',
mobile => 1,
}
]);
DESCRIPTION
This is a simple representation of a sitemap URL. It's used internally by Web::Sitemap and is not meant to be used explcitly. It is what each entry of $sitemap->add will be turned into for the XML generation.
Hash configuration in Web::Sitemap::add
If a sitemap entry is specified as a string, it inherits as much as possible from Web::Sitemap.
Passing a hash allows for overriding global sitemap settings and adding a couple more.
locURL location, just like the one that would be passed in a string version. Required.
loc_prefixSame as in "new" in Web::Sitemap
mobileSame as in "new" in Web::Sitemap
changefreqWill be inserted into
<changefreq>XML node.imagesA list of images. See "Support for Google images format" in Web::Sitemap for details.