Skip to content

Commit 0bbbddd

Browse files
Merge pull request #133 from Skeyelab/sitemap-wildcard
feat: account for other sitemap names
2 parents a881539 + e4cea96 commit 0bbbddd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ export async function crawl(config: Config) {
128128
],
129129
});
130130

131-
const SITEMAP_SUFFIX = "sitemap.xml";
132-
const isUrlASitemap = config.url.endsWith(SITEMAP_SUFFIX);
131+
const isUrlASitemap = /sitemap.*\.xml$/.test(config.url);
133132

134133
if (isUrlASitemap) {
135134
const listOfUrls = await downloadListOfUrls({ url: config.url });

0 commit comments

Comments
 (0)