Replies: 2 comments 1 reply
-
@timneutkens any insight would be appreciated! |
Beta Was this translation helpful? Give feedback.
1 reply
-
No offense, but this seems like an anti-pattern to me. Is there a reason you don't want to add a resource identifier to your url (e.g. /movies/batman/actors instead of just /batman/actors if I am understanding you correctly)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Objective: to achieve the NextJS equivalent to Gatsby's gatsby-node.js, 'createPage' function.
I'm hoping to switch from Gatsby, but running into a rather important blocker. Here's how the code works in my existing Gatsby App.
I have the above working in a bit more complicated way that aligns with your documentation, but the home page (when the url is an empty string '', implying the home route) does not work unless I add a 'index.js' file in the page directory.
This makes the most important page static, which doesn't work for my use-case.
Has anyone experienced this and solved for it? If a code example exists that could be shared, where the INDEX (url.com/) route is generated dynamically, that would be very helpful.
My approach has the reuseable logic in the pages/[...url].js file that includes both getStaticPaths & getStaticProps functions based on documentation.
Beta Was this translation helpful? Give feedback.
All reactions