If server side routing is solved with config - what about the client? #14178
Unanswered
Nixteridakis
asked this question in
Help
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everybody,
I am currently trying to implement a routing system that goes beyond the 'pages' file system limitations.
I would like to render two different components for
/category/subcategory.html
(category collection page) and/category/article123.html
(article content page).Server-side:
——————
This is solved by using your rewrites hack to check if there is an article id at the end which sends this to the article page directory. So for
mywebsite/anythingGoeshere<—1234
it will work with:Client-side:
———————
I would like to:
<Link href="/articles/[myArticle]" as="/[category]/[myArticle]"/>
but this is not possible, while pointing to the article directory to render the article with/category/myArticle
url.Is there any possibility to achieve this. Last resort is a custom server but I would like to avoid that.
My current directory structure is:
Beta Was this translation helpful? Give feedback.
All reactions