Asked By: Anonymous
I’m building a static site using next.js, and I want my website.com/about.html
to work just as: website.com/about
— I’m not sure why it’s forcing me to type .html
.
Even if I structure my project: pages/about/index.js
— it generates a about.html
instead of about/index.html
on the static site.
Solution
Answered By: Anonymous
I found the answer on next’s website:
module.exports = {
exportTrailingSlash: true,
}
https://nextjs.org/docs/api-reference/next.config.js/exportPathMap#adding-a-trailing-slash