Is it possible for SSG to ignore the variable fields in the URL [id] and render a common page on the server for all [id]? #69909
Replies: 0 comments
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.
-
I am working on an online 3D modeling website where model data is stored on the server.
Currently, my routing is
/editor?projectId=Xxxxxxand I'm very satisfied with pre-rendering the editor page using SSG.However, I don't like this URL; I want it to be more aesthetic, changing it to
/editor/XxxxxThat is, in the AppRouter it would be
/editor/[projectId]/page.tsxIn this case, SSG becomes unusable; it requires me to provide all projectIds and statically generate each page. However, my projectId is effectively limitless.
Furthermore, projectId is a parameter unrelated to the page, it can be understood that rendering does not require projectId at all. What I need to render is actually one single online modeling software page.
The projectId is only used in JavaScript outside of the React context to download models.
I have read a lot of documentation but haven't found a solution. Is there a way to solve this? Even by modifying the source code in Next.js?
Beta Was this translation helpful? Give feedback.
All reactions