If you need to exclude a link from the sitemap.xml file, which is located in the ./dist
folder, this documentation will help you.
-
Open the file
./utils/getRoutes.js
-
In the
IGNORE_ROUTES
global variable add the link to be excluded. -
Important: The link must not have a slash(/) at the end of the line.
-
Run command
npm run build & npm run generate
-
After running the commands, the
sitemap.xml
file will be generated in the./dist
folder -
The ignored link must not be in the sitemap.xml file.