Magento
HTML Sitemap
An XML sitemap is for search engines; an HTML sitemap is for people (and a nice secondary crawl path for bots). This module builds one: a single page that lists your products, categories, CMS pages and blog posts in ordered, titled sections — and exposes the same data over GraphQL so a headless Astro storefront can render its own. It only ever lists active, visible content, with configurable limits and exclusions.

Compatibility
Section titled “Compatibility”PHP
Headless
Clean
What it lists
Section titled “What it lists”Each content type is its own section with a title, a sort order and a link limit:
| Section | Source | Filtered to |
|---|---|---|
| Products | catalog | enabled + visible-in-site products |
| Categories | catalog | active categories, to a configurable depth |
| CMS pages | CMS | active pages |
| Blog posts / categories | BlogPro (if installed) | active only |
| Additional links | your config | hand-added safe links |
Headless & Luma
Section titled “Headless & Luma”The sitemap renders as a normal storefront page; product/category/CMS URLs use Magento’s native URLs.
{ htmlSitemap { sections { type title links { title url url_key } } } }In headless mode the URLs are built with your storefront’s configured prefixes, so the links point at your Astro routes — not the Magento backend.
Safe & correct
Section titled “Safe & correct”Only what's public
Products are filtered to enabled + visible-in-site, categories to active, CMS and blog to active — so a disabled or hidden item can never surface on the sitemap.
XSS-safe extra links
Hand-added “additional links” are validated — only site-relative paths and http(s) URLs are
allowed, so a javascript: or data: URL can’t be injected into the rendered sitemap.
Will disabled products or unpublished pages show up?
No — every section filters to active/visible content (enabled + visible-in-site products, active categories, active CMS and blog items), so nothing that’s hidden from the storefront appears on the sitemap.
Can I reorder the sections or cap how many links show?
Yes — each section has its own title, sort order and link limit, and you can exclude specific URL keys, so the sitemap stays useful rather than an unbounded wall of links.
Does it work on a headless storefront?
Yes — the htmlSitemap GraphQL query returns the same sections with URLs built for your headless
routes, so your Astro storefront can render its own sitemap page from one call.
Is it secure?
Admin-added extra links are scheme-validated (relative or http/https only), so no script URL can slip into the sitemap, and only public, active content is ever listed. Verified clean on PHP 8.4 and 8.5.