docusaurus-theme-github-codeblock icon indicating copy to clipboard operation
docusaurus-theme-github-codeblock copied to clipboard

Support for Docusaurus 3.0

Open mariuszkrzaczkowski opened this issue 2 years ago • 18 comments

Docusaurus yesterday released 3.0 which includes support for react 18. I tried to update but the plugin doesn't work

Do you plan to release an update which will support docusuarus 3?

image

image

mariuszkrzaczkowski avatar Nov 22 '23 22:11 mariuszkrzaczkowski

Absolutely. We would need help, though. Do you know what is required to upgrade this plugin? Do you know if upgraded plugins are backwards compatible with Docusaurus v2?

diemol avatar Nov 23 '23 11:11 diemol

Do you know what is required to upgrade this plugin?

no, I just saw the documentation of what the problems might be https://docusaurus.io/docs/migration/v3 https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3

Do you know if upgraded plugins are backwards compatible with Docusaurus v2?

yes, example: https://github.com/easyops-cn/docusaurus-search-local https://github.com/rohit-gohri/redocusaurus

mariuszkrzaczkowski avatar Nov 23 '23 11:11 mariuszkrzaczkowski

Would you be willing to help us migrate it to v3?

diemol avatar Nov 23 '23 13:11 diemol

I don't know TypeScript, but I can try it in my free time, there is probably a problem with updating MDX v3.0+ or TypeScript v5.0+

mariuszkrzaczkowski avatar Nov 23 '23 14:11 mariuszkrzaczkowski

up 🙏

gtnardy avatar Nov 29 '23 12:11 gtnardy

Thanks @mariuszkrzaczkowski!

@gtnardy would you be up to help us a bit with this?

diemol avatar Nov 29 '23 15:11 diemol

@diemol I have just published support for v3 in my fork of this package: https://github.com/christian-bromann/docusaurus-theme-github-codeblock. I hope this helps migrating this.

christian-bromann avatar Nov 30 '23 18:11 christian-bromann

Thanks @christian-bromann!!

@mariuszkrzaczkowski maybe you can check the fork and give us a hand?

diemol avatar Dec 04 '23 14:12 diemol

Hello. I am also facing the same issue. I recently upgraded to v3. I have a lot of GitHub code to display. This seems to be a blocker 😢

monica-m-ps avatar Jan 07 '24 00:01 monica-m-ps

Thanks @christian-bromann!!

@mariuszkrzaczkowski maybe you can check the fork and give us a hand?

doesn't work for https://github.com/christian-bromann/docusaurus-theme-github-codeblock/issues/136 there is some other problem

mariuszkrzaczkowski avatar Jan 29 '24 20:01 mariuszkrzaczkowski

@mariuszkrzaczkowski Were you able to troubleshoot? I can try digging into your branch if you're still blocked. I had faced loads of bugs when upgrading to 3.x.x. Let me know. 👍🏻

monica-m-ps avatar Feb 15 '24 14:02 monica-m-ps

unfortunately it still doesn't work https://github.com/YetiForceCompany/YetiForceDoc

mariuszkrzaczkowski avatar Feb 15 '24 15:02 mariuszkrzaczkowski

Ok I'll see what's wrong. Give me this weekend. Will get back to you.

monica-m-ps avatar Feb 15 '24 15:02 monica-m-ps

Any updates on this?

Dr-Electron avatar Mar 31 '24 19:03 Dr-Electron

Hello. Sorry to intervene but since I commented on this thread and got notified, @mariuszkrzaczkowski: I emailed you sometime back (on the email ID listed on your GitHub profile) to identify the issue, instead of spamming here. Please let me know if you received it.

Also, for others running into this issue, if it helps, I faced the same issue and was unable to render my GitHub code from another repo to my documentation repo that's running on Docusaurus 3.x.x. I first ensured Docusaurus 3.x.x was correctly installed and all breaking changes are addressed. Also, I migrated my .md files to .mdx as mentioned here https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3#preparing-content-for-mdx-v3.

With this plugin, I was getting errors related to CommonJS and ES Modules and they are well explained in the Docusaurus post https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3#mdx-plugins.

After running into errors, I fixed the CommonJS ones and this plugin works just fine for me.

monica-m-ps avatar Mar 31 '24 20:03 monica-m-ps

Unfortunately, after several attempts, the launch fails and I was unable to start it. Migration to version 3.2.1 went without problems, but the extension does not work

image

image

mariuszkrzaczkowski avatar Apr 27 '24 20:04 mariuszkrzaczkowski

Any updates on this?

sciotta avatar Jul 11 '24 00:07 sciotta

@sciotta would you like to help us fix this? There is a fork where it got fixed. Maybe you can contribute? Check the comments above. Thanks!

diemol avatar Jul 11 '24 02:07 diemol