leerob / leerob.io

✨ My portfolio built with Next.js, Tailwind, and Vercel.

Home Page:https://leerob.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Unixify caveat for Windows on sitemap build

saqbach opened this issue · comments

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);

Thank you, I will update and link back here!

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?

commented

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