netlify-plugin-sitemap
netlify-plugin-sitemap copied to clipboard
netlify-plugin-sitemap doesn't generate a sitemap during manual deployment by netlify CLI
Hi! I have noticed the netlify-plugin-sitemap doesn't generate a sitemap during manual deployment by netlify CLI. When the website is live I get not found. I deployed it in the netlify app and the sitemap was generated. Please help me to understand how to manage it.
To Reproduce
Steps to reproduce the behavior:
- Deploy it to Netlify
I use a such command to deploy the website:
netlify deploy --site **************** --auth *********************
netlify.toml
[build]
publish = "dist"
[[headers]]
for = "/*"
[headers.values]
Accept-Encoding = "gzip, compress, br"
#Sitemap
[[plugins]]
package = "@netlify/plugin-sitemap"
[plugins.inputs]
buildDir = "dist"
filePath = "./sitemap.xml"
"dependencies": {
"@netlify/plugin-sitemap": "^0.8.1",
}
- See that the sitemap file is missing after deployment.
I want to get a generated sitemap after manual deployment instead always going to the Netlify app and triggering the deploy
Possibly related?
I just enabled the sitemap plugin via the Netlify UI. I manually deployed by uploading files. There is no sitemap generated at domain/sitemap.xml.
@ybabenkoJapp
You should also be running netlify build after your regular build process.
For me, it looks like this in my package.json file:
"scripts": {
// ... other lines
"deploy": "npm run build && netlify build && netlify deploy --dir=dist --prod"
}