-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 305 broken link because of language fixes #322
Conversation
Let me know if double having is intentional
Have you tested the GitHub versioning and page export? I have no idea how to test that bit myself. |
@neilsutcliffe I actually don't know what exactly are those. I haven't touched versioning part yet. |
Did a round test on Docusaurus site. Look good. Except one thing, after |
@neilsutcliffe I believe this PR, while touching versioning a little bit through some refactoring, does not affect versioning in any meaningful way. That said, I can run |
@richardzcode I am testing this PR out now. Thanks! |
I'm having a read up on Versioning now. It will be useful to know. |
Well that would be testing deployment I guess. Can a docker container do that? |
@richardzcode I am running the Docusaurus site locally too. It is looking good. One thing your PR adds to our site is the translation dropdown. vs. what is on docusaurus.io now. I am initially thinking that this is a good thing since we do have translations enabled with a |
That's a good point. Yes, you need to go into the |
I like it. Even if it only has one option. If the presence of a language file can determine if languages are available, then that is a win for convention! |
@richardzcode This is looking good. I have done testing on both the examples site from There might be a few updates I make after we land this, but all in all, this should probably be our direction. Thinking about this -- this could theoretically be a breaking change for some sites depending on how they have their |
Yeah I thought too showing dropdown was good even if only one language enabled. But it can be both ways. To keep consistent let's hide it. |
@richardzcode That's fair for now. But I might bring it back even for only one language :) I think I like the relationship of:
We could also have a config option called |
There is also logic in headerNav that allows you to add a language box using the siteConfig.js but I'm guessing that should never be used?
|
@neilsutcliffe Hi.
e.g., in
And the code you referenced is the only code where we render the So it is used all the time :) @richardzcode could have, I suppose, put his checks there instead of directly in |
right. the check is better to be outside. keep the logic of hiding dropdown for one language for now. |
I just left a massive pull-request, which I don't expect to get approved for sometime, if at all that relates a bit to this issue. |
@richardzcode I am going to try this merge again. :) I did testing on the test site and the Docusaurus site. All seemed pretty well, modulo some small changes that I will make afterwards. @neilsutcliffe You many want to rebase #326 after this lands, assuming I don't have to revert it for whatever reason. |
Ok, here we go. :) |
https://docusaurus.io seems functional \o/ |
Thank you @JoelMarcey ! For potential breaking of some sites. What I can think of is to create both default pages and 'en' pages. In
add something like
But not sure if it is worth it. I personally would rather let user correct their index pages, since most of the users are just starting out. |
I'm not sure about rebasing, but I merged the previous version of this PR (and will merge in the latest master too). Obviously I had a lot of conflicts, but I'm in the right space to deal with them. |
Motivation
Second attempt to fix #305
Fixed some bugs in the first PR. Tested many rounds in translation enabled/disabled cases.
Test Plan
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)