Add Unixify caveat for Windows on sitemap build
saqbach opened this issue · comments
Austin Hale commented
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);
Lee Robinson commented
Thank you, I will update and link back here!
Aaron Soto commented
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?
Lukas commented
Not sure you need a sitemap on your local machine- you can probably disable it locally