Skip to content

Commit

Permalink
exclude .gitkeep
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliadiak committed Oct 31, 2023
1 parent 93d04ac commit b7af19d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const PDF_LINKS = [
'/uk/kids/stories/pdf/*',
'/alphabet/pdf/*',
'/uk/alphabet/pdf/*',
'/pdf/.gitkeep'
];

/** @type {Object<string,Array<string>>}} */
Expand All @@ -54,7 +53,9 @@ module.exports = {

// add pdf files to sitemap
pdfFiles.forEach(async (file) => {
result.push(await config.transform(config, `${SITE_URLS[countryVariant]}/pdf/${encodeURIComponent(file)}`));
if (file !== '.gitkeep') {
result.push(await config.transform(config, `${SITE_URLS[countryVariant]}/pdf/${encodeURIComponent(file)}`));
}
});

return result;
Expand Down

0 comments on commit b7af19d

Please sign in to comment.