How do you make a named route for the homepage?
I have tried:
routes.add('home', '/')
But that results in Client pings, but there's no entry for page: /home.
In some situations you want a index route with the name the same as an existing page file.
// When pages/sellers.js exists
routes.add('sellers', '/')
It automatically renders pages/sellers.js instead of pages/index.js.
Are these bugs? Is there a way to use all the parameters somehow to workaround the issues?
If no page is given as the third argument, it uses the name from the first argument as the page to render. So if you name it index, it will render that page. If you use a different name and it should render index, do this:
routes.add('sellers', '/', 'index')
Thanks, your tip worked.
Most helpful comment
If no page is given as the third argument, it uses the name from the first argument as the page to render. So if you name it
index, it will render that page. If you use a different name and it should renderindex, do this: