You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/assets/sitemapper.js
+23-4
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,13 @@ export default class Sitemapper {
28
28
* @params {boolean} [options.rejectUnauthorized] - If true (default), it will throw on invalid certificates, such as expired or self-signed ones.
29
29
* @params {lastmod} [options.lastmod] - the minimum lastmod value for urls
30
30
* @params {hpagent.HttpProxyAgent|hpagent.HttpsProxyAgent} [options.proxyAgent] - instance of npm "hpagent" HttpProxyAgent or HttpsProxyAgent to be passed to npm "got"
31
+
* @params {Array<RegExp>} [options.exclusions] - Array of regex patterns to exclude URLs
31
32
*
32
33
* @example let sitemap = new Sitemapper({
33
34
* url: 'https://wp.seantburke.com/sitemap.xml',
34
35
* timeout: 15000,
35
-
* lastmod: 1630693759
36
+
* lastmod: 1630693759,
37
+
* exclusions: [/foo.com/, /bar.xml/] // Filters out URLs matching these patterns
36
38
* });
37
39
*/
38
40
constructor(options){
@@ -49,6 +51,7 @@ export default class Sitemapper {
0 commit comments