Skip to content

Commit

Permalink
account for other sitemap names
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Dahl authored and Eric Dahl committed Jan 4, 2024
1 parent ea38a63 commit e4cea96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ export async function crawl(config: Config) {
],
});

const SITEMAP_SUFFIX = "sitemap.xml";
const isUrlASitemap = config.url.endsWith(SITEMAP_SUFFIX);
const isUrlASitemap = /sitemap.*\.xml$/.test(config.url);

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

0 comments on commit e4cea96

Please sign in to comment.