Sitemap
Index
Constructors
constructor
Parameters
urls: string[]
Returns Sitemap
Properties
readonlyurls
Methods
staticload
Fetch sitemap content from given URL or URLs and return URLs of referenced pages.
Parameters
urls: string | string[]
sitemap URL(s)
optionalproxyUrl: string
URL of a proxy to be used for fetching sitemap contents
Returns Promise<Sitemap>
statictryCommonNames
Try to load sitemap from the most common locations -
/sitemap.xml
and/sitemap.txt
. For loading based onSitemap
entries inrobots.txt
, the RobotsFile class should be used.Parameters
url: string
The domain URL to fetch the sitemap for.
optionalproxyUrl: string
A proxy to be used for fetching the sitemap file.
Returns Promise<Sitemap>
Loads one or more sitemaps from given URLs, following references in sitemap index files, and exposes the contained URLs.
Example usage: