-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Migrate Website to Docusaurus 2 Alpha #108
Comments
Cool, thanks for the heads up. Would be interesting to try it and see how it goes. [edit] also the correct person to tag in this case would be @joeldenning :) |
I'm looking forward to this, awesome! |
Ah, I didn't realize that @lex111 would be doing the work of the migration - I thought this was just a notification that the v2 alpha was available and that we should do it. In that case, I approve the effort of creating a PR with v2 and going forward with it. Let me know if there's anything that we can do to help. Thanks! |
Quick question: can we refuse the GitHub star button in the footer or not? Is it really needed? |
Is it needed? probably not. Is it nice? in some ways, yes. I see github stars as a way for lesser-known projects that don't have the name recognition of bigger players to show that there is a community and support for this project, and that it's not just being used by 1 or 2 people. that's just my thoughts though. anyone else feel free to chime in as well. |
As the new version will have a dark theme, I propose changing syntax highlighting to dark colors. (Since dynamically we cannot change the code blocks highlighting scheme). Any objections? If not, please pick up a theme - https://github.com/PrismJS/prism-themes#available-themes and write me the theme name.
I did it :) I would like to have less differences compared to the current version. |
nope!
thanks! |
So what theme are we using? The only problem is still in the URLs. Currently, they comes with the And there are no any redirects, this is bad for SEO, and I don’t know yet how to fix it 😿 |
I assume it would be easy to change? Anyway, let's start with Atom Dark.
oh interesting. has there been any discussion in docusaurus about this change? |
This is a piece of cake (Just still CSS styles need to be tweaked).
Docusaurus devs don’t care... at least for now. 🤷♂️ |
haha. Wonder if they'll care if we say we don't want to move forward with the alpha until it's solved? not sure a small website like ours can afford to take an SEO hit. |
Unfortunately, I found out about it at the last moment, when almost finished migrating to v2, it's very disappointing, because it seems to me self-evident that it is necessary to provide for such a thing as redirects.. |
Hi there, just wanted to clear things up. I think it can be slightly misleading to say that "we don't care". We do care. @lex111 mentioned this on Discord channel just yesterday and its definitely in our radar. I know it can be disappointing since lex111 has put some effort on the migration and we're sorry for that. We are still in alpha period and created the 😎 Get swag for migrating websites to Docusaurus 2! issue exactly to find this kind of migration issue so that we can address it during this period. Way before that, we also have migrated some fb's own docs site. Its just a coincident that all of them had There are still times to address things up, and we appreciate your effort here. There are many ways to solve this that I can think of, however any thoughts/opinions on how to solve this best will be appreciated
|
oh, no worries for my part. Thank you for coming in and clarifying. :)
Hm, yeah, that is an interesting challenge. For clarity's sake, is the "cleanUrl" setting the recommended (or only possible?) setting starting with v2? It's been a long time since I've gone into google webmaster tools, but was there a way in there to also submit a... CSV list of url mappings as well? It wouldn't actually redirect, but it may help with the SEO side of things. 🤷♀ But yeah, I think either of the solutions you suggested are fine by me. I haven't dug enough into the internals of docusaurus to really provide any additional insights, sorry. |
Yes.. I'm a little rude, sorry for that, but I still don't understand why you removed many useful features (eg
I don't know yet, I would prefer the solution that was used in the v1. I need time to do this, it's not so easy for me :( |
Please take a look at #109. |
We should probably check out the auto-deployment script -- doesn't appear that single-spa.js.org has been updated to the latest changes. |
closed by #115 |
looks like we're having redirect issues. see #116 |
another one I found is if you go to this url https://single-spa.js.org/docs |
@lex111 try to use Thanks for the help btw |
@endiliey thanks for the tip, but this function does not do what is needed in this situation - it does not solve the issue with the trailing slash. https://github.com/facebook/docusaurus/blob/639d8d3eace5ee59535b3879de54da640a57e0cf/packages/docusaurus-utils/src/__tests__/index.test.ts#L222 |
Some more links not working: clicking on the four links shown here https://github.com/CanopyTax/single-spa.js.org/blob/c9620827fe7749ff423a607721e4d95cfbc62938/website/src/data/docs.js#L22 |
@endiliey while using dark mode, I'm seeing a flash of the white theme and then going back to the dark them while navigating around. Any thoughts on that? |
Thats interesting (?) Mind to send ascreencast ? I cant reproduce it, we have dogfooded it for quite a while and so far nobody complained that. I am suspecting the redirect plugin override the generated html with static html and that causes page refresh and not utilizing the client side routing/SPA |
I will take a look later. I am not within reach of my pc |
The issue is this https://github.com/CanopyTax/single-spa.js.org/blob/c9620827fe7749ff423a607721e4d95cfbc62938/website/src/data/docs.js#L22 It should not end with https://github.com/CanopyTax/single-spa.js.org/blob/master/docs/examples.md is mapped to Going to https://single-spa.js.org/docs/examples/ will actually go to https://github.com/CanopyTax/single-spa.js.org/blob/gh-pages/docs/examples.html (a redirect) instead of https://github.com/CanopyTax/single-spa.js.org/blob/gh-pages/docs/examples/index.html |
Oh, I’m already confused about all this, the fact is that without a slash a redirect occurs and this is strange behavior, and I can’t understand why this happens. In the end, I decided that it was because of GH Pages, since there is no such issue when deploying via ZEIT Now 🤷♂️ |
Yeah different hosting resolves differently. Anyway, on the first hand the link shouldnt be |
@frehner can we use Netlify instead of GH Pages? |
I would rather not switch off of github pages to zeit/netlify. That seems like an unreasonable requirement of using docusaurus. |
I agree, but this is not a Docusaurus requirement. In this case, the problem with the processing of redirects, this is not directly related to Docusaurus. You can easily switch to Zeit (Netlify alas has the same behavior as GH Pages), but if you don't want to, it is fine for me. Any way, redirects are temporary, and after a while you can remove their functionality, I think. |
Shouldn't we like close this issue. We have solved the dark mode problem few releases ago too.. |
Yeah it seems to be working fine. I don't remember why there was discussion about switching off of github pages to zeit/netlify, something about redirects/routing maybe. But we've been using the new version of docusaurus for the live site for a while now, so we can close this. |
FYI docusaurus@2.0.0-alpha.39 breaks things for us. I upgraded to alpha 37 for versioned documentation support, but had to pin to alpha 37 because alpha 39 breaks things. See related #131 |
@joeldenning its because of mdx parsing bug. But anyway it will be fixed in next release. See facebook/docusaurus#2105 |
👍 thanks I'll follow that issue Another thing - I have a new page whose route makes use of query parameters. The routes.js file is confusing to me since all my modifications to it are overwritten by docusaurus. My preferred route is The reason why the trailing slash is problematic is because when I go to https://single-spa.js.org/error?code=1 it does a redirect to You can take a look at the four most recent commits on master branch to see what I'm referring to. Do you have any tips on how I can get the route to not have a trailing slash? |
/src/pages/foo/test.js → /foo/test |
I understand how Docusaurus makes magic routes out of file paths. What I'm saying is that I don't like the magic routes and want to change them. There are two things that would help me:
|
You'll have to write your own plugin to add route then :| It's basically just this for https://v2.docusaurus.io/docs/lifecycle-apis/#async-contentloadedcontent-actions |
👍 thanks for the info |
FYI I got the redirects to preserve query strings with some document.write() magic - https://github.com/CanopyTax/single-spa.js.org/blob/master/website/src/plugins/docusaurus-plugin-redirects/src/index.js#L35 |
Well, i guess you can always do that 😆 |
Plus I created single-spa/single-spa#406 which changes over most of the links to the page to have a trailing slash. |
Hi there (@@joeldenning and others)! The Docusaurus team is currently developing Docusaurus 2 and are almost done with an MVP that doesn't include translations and versioning features, which means there's feature parity with your website's current usage of Docusaurus.
Docusaurus 2 brings about many improvements:
I will be your POC in helping you throughout the migration process. Let me know what you think!
cc @yangshun @endiliey @wgao19
The text was updated successfully, but these errors were encountered: