Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netlify-plugin-sitemap doesn't generate a sitemap during manual deployment by netlify CLI #97

Open
ybabenkoJapp opened this issue Jan 25, 2023 · 2 comments

Comments

@ybabenkoJapp
Copy link

ybabenkoJapp commented Jan 25, 2023

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:

  1. 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",
}

  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

@andrew-davis
Copy link

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.

@neontomo
Copy link

@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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants