In next js, a typical path to a page is:
/pages/blog/index.js
In Visual Studio Code, this means when I am editing a bunch of pages, they all show up as index.js in the tabs making it difficult to keep files sorted out.
I prefer to name my pages like so:
/pages/blog/blog.js
for the the page that you go to when you go to example.com/blog
Is there a way to configure this behavior in Next.js?
you can move your content from index.js to blog.js
then in index.js you put this code:
import blog from "./blog.js";
export default blog;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With