Sitemapper.generate
You're seeing just the function
generate
, go back to Sitemapper module for more information.
Specs
generate(stream :: Enumerable.t(), opts :: keyword()) :: Stream.t()
Receives a Stream
of Sitemapper.URL
and returns a Stream
of
{filename, body}
tuples, representing the individual sitemap XML
files, followed by an index XML file.
Accepts the following Keyword
options in opts
:
sitemap_url
- The base URL where the generated sitemap files will live. e.g.http://example.org
, if your sitemap lives athttp://example.org/sitemap.xml
(required)gzip
- Sets whether the files are gzipped (default:true
)name
- An optional suffix for the sitemap filename. e.g. If you set tonews
, will producesitemap-news.xml.gz
andsitemap-news-00001.xml.gz
filenames. (default:nil
)index_lastmod
- An optional Date/DateTime/NaiveDateTime for the lastmod element in the index. (default:Date.utc_today()
)