Closed Pierre-Gilles closed 3 years ago
Thanks :)
Please add your site to our showcase: https://v2.docusaurus.io/showcase
Yes it looks like a validation error and should be a boolean. I find this option a bit confusing and would even like to remove it in the future, not sure it's worth to fix it as it would encourage usage ðĪŠ if only you report this bug it should not be very widely used ð
Note the latest Docusaurus alpha has i18n support (we'll release it officially very soon) and has a "localeDropdown" navbar item for this exact usecase, and we have a pathname:///fr
escape hatch to also solve this in a more generic way (we don't add baseurl in those cases, for all links with pathname://
, including <Link>
and md links.
Can you please try using pathname:///fr
and let me know if it works for your usecase? (href or to should both work)
If that's the case I'll look at removing this option and documenting this betterr
@slorber Good idea! Just added https://gladysassistant.com here => https://github.com/facebook/docusaurus/pull/4408
Note the latest Docusaurus alpha has i18n support (we'll release it officially very soon)
That's an amazing news! Right now, what we did is that we built two separate Docusaurus website (one in EN/one in FR) who shared React components ^^ I can't wait to migrate to the official i18n support :)
You mean like this ?
It doesn't seem to work, the baseUrl is still added in the generated html:
That's an amazing news! Right now, what we did is that we built two separate Docusaurus website (one in EN/one in FR) who shared React components ^^
I saw that. Somehow it's what the i18n support does, it's just you won't need to duplicate site configs.
It doesn't seem to work, the baseUrl is still added in the generated html:
Hmmm I believe it may work better with "to" instead of "href", for some legacy reasons there's a distinction in the way these 2 attributes are handled, but I'd like to remove that distinction
Hmmm I believe it may work better with "to" instead of "href", for some legacy reasons there's a distinction in the way these 2 attributes are handled, but I'd like to remove that distinction
Same problem with "to" instead of "href" !
FYI, I migrated to Docusaurus latest, it's really nice! Congrats on the work on i18n ð
Thanks!
Can confirm there is something wrong with the pathname://
protocol here and the baseurl is appended by mistake
First, thank you very much for Docusaurus, it's a great tool that we use for another open-source project, Gladys Assistant ð
When I read the doc here: https://v2.docusaurus.io/fr/docs/next/api/themes/configuration, I see that the "prependBaseUrlToHref" option is a boolean:
But in the code, the prependBaseUrlToHref option is a string:
https://github.com/facebook/docusaurus/blob/333545aa97d0a08eb35146673ec32078d5d2a19f/packages/docusaurus-theme-classic/src/validateThemeConfig.js#L54
This results in an error when I try to build my website:
I suppose it's an error in the Joi validation :)