Behavior of onBeforePrerenderStart
hook
#1695
Unanswered
marek-hanzal
asked this question in
Help & Questions
Replies: 1 comment 1 reply
-
I don’t see how your use case is different from the usual i18n use case so I guess following the i18n docs may help you, namely using both hooks onBeforePrerenderStart as well as onPrerenderStart. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using Vike for SSG with slug in url
/@locale
. The problem is every nested route calls rootonBeforePrerenderStart
and fails as it returns the same locale.One workaround is to put
onBeforePrerenderStart
in every nested directory, which is not acceptable for many reasons.Am I using this hook wrong, is there some workaround, or is there some hope this hook get's it's URL, so it would be possible to properly generate all pages using one hook?
Thank you!
P.S. I've found quite dirty hack able to somehow fix the problem:
(
runPrerenderer.js
)Then I can do something like this:
There is probably nicer way how to solve this, but goal is just to start a .... discussion :).
Beta Was this translation helpful? Give feedback.
All reactions