Skip to content

Can i set a baseUrl for defaultLocale #8745

Answered by slorber
laojun asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

I understand that you don't want the baseUrl to be removed for the default locale.

For now, we don't make it very easy, unfortunately.

But a new DOCUSAURUS_CURRENT_LOCALE env variable available in the config file should make it easy to tweak the config on a per-locale basis (ie use baseUrl: /zh/for localezh`).

Should be available in the upcoming v2.4, but you can try using a canary version today.
#8677

We also want to add first-class support for a baseUrl that you can configure per locale, as it was attempted in this draft PR: #6731

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@laojun
Comment options

@laojun
Comment options

@slorber
Comment options

Answer selected by laojun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants