Skip to main content
Version: Next

ParseSitemapOptions

Index

Properties

optionalemitNestedSitemaps

emitNestedSitemaps?: boolean

If set to true, elements referring to other sitemaps will be emitted as special objects with originSitemapUrl set to null.

optionalmaxDepth

maxDepth?: number

Maximum depth of nested sitemaps to follow.

optionalnestedSitemapFilter

nestedSitemapFilter?: (sitemapUrl) => boolean

Optional filter for nested sitemap URLs discovered in sitemap index files. Called with the URL of each child sitemap before it is fetched. Return true to include the sitemap, false to skip it. If not provided, all nested sitemaps are followed.


Type declaration

    • (sitemapUrl): boolean
    • Parameters

      • sitemapUrl: string

      Returns boolean

optionalnetworkTimeouts

networkTimeouts?: Delays

Network timeouts for sitemap fetching. See Got documentation for more details.

optionalreportNetworkErrors

reportNetworkErrors?: boolean = true

If true, the parser will log a warning if it fails to fetch a sitemap due to a network error

optionalsitemapRetries

sitemapRetries?: number

Number of retries for fetching sitemaps. The counter resets for each nested sitemap.