buildSitemapXml
buildSitemapXml(
result,options):string
Renders a sitemap document from getSitemap()’s response.
Pure: data in, string out. No I/O, no fetch, no environment access — so it is equally
callable from a request handler and from a static site’s build script. Serving the result at a
URL is the consumer’s own job and deliberately not part of this package: we do not deploy your
site, and any route adapter we shipped would encode assumptions about a stack we do not control.
Parameters
Section titled “Parameters”result
Section titled “result”options
Section titled “options”Returns
Section titled “Returns”string
Throws
Section titled “Throws”past MAX_SITEMAP_URLS. A loud failure at the cap is recoverable; an invalid sitemap discovered months later in Search Console is not.