Sitemapper v0.1.0 Sitemapper View Source

Sitemapper is an Elixir library for generating XML Sitemaps.

It's designed to generate large sitemaps while maintaining a low memory profile. It can persist sitemaps to Amazon S3, disk or any other adapter you wish to write.

Link to this section Summary

Functions

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.

Receives a Stream of {filename, body} tuples, and persists those to the Sitemapper.Store.

Receives a Stream of {filename, body} tuples, takes the last one (the index file), and pings Google and Bing with its URL.

Link to this section Functions

Link to this function

generate(enum, opts)

View Source
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: (required) The base URL where the generated sitemap files will live. e.g. http://example.org, if your sitemap lives at http://example.org/sitemap.xml

Receives a Stream of {filename, body} tuples, and persists those to the Sitemapper.Store.

Will raise if persistence fails.

Accepts the following Keyword options in opts:

Receives a Stream of {filename, body} tuples, takes the last one (the index file), and pings Google and Bing with its URL.