Skip to content

Commit

Permalink
Merge pull request #133 from Skeyelab/sitemap-wildcard
Browse files Browse the repository at this point in the history
feat: account for other sitemap names
  • Loading branch information
marcelovicentegc committed Jan 4, 2024
2 parents a881539 + e4cea96 commit 0bbbddd
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 0bbbddd

Please sign in to comment.