HTML sitemap renderer for PhoenixKit.
Generates human-readable HTML sitemaps in three styles:
- hierarchical - grouped by category, then by first letter
- grouped - grouped by category/source
- flat - single alphabetical list with multi-column layout
HTML sitemaps are generated on-the-fly and cached in ETS via Cache.
They are NOT written to disk (unlike XML sitemaps).
Summary
Functions
Renders an HTML sitemap from pre-collected URL entries.
Functions
@spec generate( keyword(), [PhoenixKit.Modules.Sitemap.UrlEntry.t()], atom(), keyword() ) :: {:ok, String.t()}
Renders an HTML sitemap from pre-collected URL entries.
Validation and cache lookup are handled by the caller (Generator.generate_html/1).
This function only renders HTML and optionally caches the result.
Parameters
opts- Options (:style,:title)entries- Pre-collected URL entriescache_key- Atom key for ETS cache storagecache_opts- Optional:[cache: false]to skip caching