How to make dynamic routes at start empty?
Unanswered
British Shorthair posted this in #help-forum
British ShorthairOP
I have a website with the following structure:
-
-
-
However, after completing the whole website I want to change the structure like so:
-
-
-
NOTE: I also use SSG for this website:
[lang]/about which renders:-
/en/about-
/de/about-
/sq/aboutHowever, after completing the whole website I want to change the structure like so:
-
/about (English by default)-
/de/about -
/sq/aboutNOTE: I also use SSG for this website:
export async function generateStaticParams() {
return [{ lang: 'en' }, { lang: 'de' }, { lang: 'sq' }]
}6 Replies
first thought, but could you abuse middleware and rewrites?
Either that ^ or a optional catchall segment (check docs).
Not sure how recommended that would be though, but it can work
see, idk if youd want a catchall
and i haven't tried if you can make an optional dynamic
Optional dynamic?