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

Add Unixify caveat for Windows on sitemap build #293

Closed
saqbach opened this issue Mar 20, 2021 · 3 comments
Closed

Add Unixify caveat for Windows on sitemap build #293

saqbach opened this issue Mar 20, 2021 · 3 comments

Comments

@saqbach
Copy link

saqbach commented Mar 20, 2021

Just an FYI -- if you're following the sitemap build process on your nextjs-sitemap-robots blog post, it may be worth mentioning that if you're on a Windows machine, globby is not going to work for the path.join('') step, unless you either do a regex replace or use something like unixify.

// generate-sitemap.js

const unixify = require('unixify');

... 

// Unixify is needed for when you're on a Windows machine
const route = path === '/index' ? '' : unixify(path);
@leerob
Copy link
Owner

leerob commented Aug 16, 2021

Thank you, I will update and link back here!

@leerob leerob closed this as completed Aug 16, 2021
leerob added a commit that referenced this issue Aug 16, 2021
@aaron-soto
Copy link

Thank you, I will update and link back here!

Coming from your Blog Post, is this the case if developing on Windows machine but hosting on Vercel?

@quick007
Copy link

Not sure you need a sitemap on your local machine- you can probably disable it locally

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

No branches or pull requests

4 participants