Sitemaps.Builders.File (Sitemaps v0.1.2)

Copy Markdown View Source

Build the file content of the sitemap. It creates the file and it's in charge of the size, if it's growing over the configured size, it's creating a new file.

Summary

Functions

Add a link inside of the file. The link attribute must be a valid link for accessing to a page in the website and we could add some attributes.

Returns a specification to start this module under a supervisor.

Write the file in the XML format for the sitemap. First step is reserve a new name and then perform the writing of the links accumulated in the state.

Functions

add(link, attrs \\ [])

Add a link inside of the file. The link attribute must be a valid link for accessing to a page in the website and we could add some attributes.

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

decr_state(key, number)

decr_state(name, key, number)

incr_state(key, number)

incr_state(name, key, number)

start_link(opts)

start_link(name, opts)

write()

Write the file in the XML format for the sitemap. First step is reserve a new name and then perform the writing of the links accumulated in the state.