the-programmers-hangout / website

🌳 TPH website
https://theprogrammershangout.com
MIT License
102 stars 67 forks source link

Change `path.join` to `path.posix.join` ensuring path uses `/` not `\` #357

Closed dfireBird closed 4 years ago

dfireBird commented 4 years ago

This PR fixes #214

path.join in Windows converts / in paths to \, so the path of those pages are converted to /resources\javascript\iterative-vs-functional.md but browsers can't use \ in URL so it's redirected as 404 page.

path.posix.join ensures it's always use / regardless of OS.

Edit: Shoutout to my brother for lending me his PC.

veksen commented 4 years ago

today I learned!