# `PhoenixKit.Modules.Sitemap.HtmlGenerator`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/modules/sitemap/html_generator.ex#L1)

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).

# `generate`

```elixir
@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 entries
- `cache_key` - Atom key for ETS cache storage
- `cache_opts` - Optional: `[cache: false]` to skip caching

---

*Consult [api-reference.md](api-reference.md) for complete listing*
