AshSitemap.Helpers (ash_sitemap v1.0.1)

View Source

Useful helper functions

Summary

Functions

Renders a progress bar

Gets the rootpath in relation to the current module

Returns the schema for the sitemap.

Returns the number of sitemap files to generate

Xml footer for the sitemap.

Xml header for the sitemap.

Xml index footer for the sitemap.

Xml index header for the sitemap.

Functions

allow_deny(bool)

autoplay(bool)

divmod(number, divisor)

Parameters

number - any integer/float divisor - what to divide by

Returns

{quotient, remainder}

Example

iex(6)> Data.divmod(12, 2) {6, 0} iex(7)> Data.divmod(12, 3) {4, 0} iex(8)> Data.divmod(12, 4) {3, 0} iex(9)> Data.divmod(12, 4.5) {2, 3.0}

eraser(elements)

getenv(key)

is_numeric(str)

iso8601()

iso8601(dt)

iso8601(yy, mm, dd, hh, mi, ss)

nil_or(opts)

nil_or(list, value)

progress_bar(count, total, prefix)

Renders a progress bar

root_path()

Gets the rootpath in relation to the current module

schemas()

Returns the schema for the sitemap.

sitemap_files_count(count, limit)

Returns the number of sitemap files to generate

urljoin(src, dest)

xml_footer()

Xml footer for the sitemap.

xml_header()

Xml header for the sitemap.

xml_index_footer()

Xml index footer for the sitemap.

xml_index_header()

Xml index header for the sitemap.

yes_no(bool)