Update to Docusaurus 2.0 and leverage new features available
Is your feature request related to a problem? Please describe. Currently, we cannot add custom alt text to images. With the new update, this can be fixed.
From @shahsank3t :
@Michael-Grover @jeromesimeon The current version of Docusaurus we are using doesn't support passing a custom alt text to the image. It refers to the title itself. (Ref: https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-1.x/lib/core/nav/HeaderNav.js#L315)
If there's a plan to update Docusaurus version to the latest one, they have added supported to add custom alt text (Ref: https://github.com/facebook/docusaurus/blob/master/website/docusaurus.config.js#L61-L64)
Just a heads-up, if we decide upon updating the library, there will be plenty of changes in existing siteConfig.js to catch up with the latest ones. :)
I'm guessing we want to at least update to Docusaurus 1.13.0. Docusaurus 2.0 is still in alpha, but we should keep an eye on it.
@jeromesimeon updating to 1.13.0 is pretty straight forward with no breaking changes. I did it on my local and everything seems to be working fine, of course without custom alt text that's needed.
Should I submit a PR with this change or are we waiting for 2.0 to release and then update?
@shahsank3t I would definitely do it, especially if this includes support and fixes for the alt text you were pointing to in your earlier comments.
This might need a bit of a visual review to make sure nothing is broken.
Docusaurus 2.0 seems like a much bigger change, which we may not start using for a while.
@jeromesimeon - FYI alt text support and fixes are provided in 2.0 and not in 1.13.0 so even if we update this minor version, it won't fix our case.
@jeromesimeon - FYI
alt textsupport and fixes are provided in2.0and not in1.13.0so even if we update this minor version, it won't fix our case.
Ah that makes sense. Thanks! With that said, if you do a PR for this, I will review / merge it!
@jeromesimeon - Raised PR - https://github.com/accordproject/techdocs/pull/161
I've merged #161 I'm leaving this issue open (changing the title to mentioned Docusaurus 2.0).
Can I work on this?
Can I work on this?
We're already using the latest stable version of Docusaurus. This issue still open to track switching to 2.0 which is still in beta. I'm not sure whether we are ready to make the switch, although I would certainly love to see a mockup and/or evaluation for this. @irmerk @mttrbrts any opinion about this?
... I would certainly love to see a mockup and/or evaluation for this. @irmerk @mttrbrts any opinion about this?
I think it'd be interesting to see something put together.
... I would certainly love to see a mockup and/or evaluation for this. @irmerk @mttrbrts any opinion about this?
I think it'd be interesting to see something put together.
Sounds good to me too. Note that Docusaurus 2.0 is clearly listed as "not production ready": https://v2.docusaurus.io/docs/introduction
I think the main tasks would be:
- [ ] Same web site as current one but migrated to Docusaurus 2.0 (same features and content)
- [ ] Try and leverage new features (e.g., plugins, see also #112)
- [ ] Try and leverage custom alt images (as indicated in this issue)
- [ ] Evaluate is any other features we could leverage from the new version
@devcer Are you still planning / working on this?
I wasn't keen on this since 2.0 isn't ready. I might want to look into this over the next week or so if no one else is looking into it.
I wasn't keen on this since 2.0 isn't ready. I might want to look into this over the next week or so if no one else is looking into it.
This is definitely a valuable contribution, even if early. If you try it and like Docusaurus 2.0 and we can start the migration, we'll definitely consume that work down the road!
Hi @jeromesimeon , I tried migrating the accordproject documentation from v1 to v2 and I was able to overcome many hurdles and be finally able to run it. I have deployed it on development server cloud run at https://accordproject-znyzg7zhdq-uc.a.run.app/ as I was unable to build the website due to (undefined) Error: Minified React error #152 and I am unable to debug it. The github repo where the source code is deployed is at https://github.com/prakharsr/techdocs. The features/ components which are incomplete and need fixing are:
- Fixing the index page and footer and make it look the same as in v1 (I am facing hurdles here as I don't know much react).
- Fixing background colors and snippets color highlighting.
- Migrating syntax highlighting to Prism (not yet completed).
@mttrbrts and @prakharsr is this Issue finished with #330?
hey @irmerk ! Yes, this issue #160 is fixed with #330. Some styling work is migrated to issue on #335.
@jesswang-dev if you're interested in previous discussions about docusaurus migration
@jesswang-dev if you're interested in previous discussions about docusaurus migration
@jesswang-dev Following our discussion on the working group call, I'm happy to assign this to you. Although you'll need to comment here before GH will allow me to add you.
Hi, @mttrbrts thanks for following up!