Skip to content

MDX support #112

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

Open
Madoshakalaka opened this issue Jan 10, 2022 · 8 comments
Open

MDX support #112

Madoshakalaka opened this issue Jan 10, 2022 · 8 comments

Comments

@Madoshakalaka
Copy link

Summary

.mdx is a superset of .md, markdown empowered with jsx, used by popular ssg framework docusaurus.
Sadly GitLocalize doesn't support it right now.

Repository URL

I am a contributor of Yew, a rising web-frontend framework in Rust. Its website is built with docusaurus, mdx, and GitLocalize, (yew.rs). Currently, we have to change the mdx suffix to md in the project and ask developers to use the ugly hack of overriding markdown file type association in order to stay with GitLocalize.

Possible fixes

Since new formats are constantly emerging, can't GitLocalize fall back to plaintext when it doesn't recognize the file types?

Thanks for your time 🌹

@svasilenkov
Copy link

@Madoshakalaka Thank you for the suggestion. MDX support is in our to-do list and will be implemented in the future.

@ilyaspiridonov
Copy link
Member

@Madoshakalaka We've discussed this internally and we'll add mdx support in a way that .mdx files will be parsed by our current markdown parser - this should work in general, and looks like a relatively quick fix in theory. Will keep you posted.
P.S. Yeah, saw that a lot of crazy things are happening in your GitLocalize project because of renaming... :)

@svasilenkov
Copy link

@Madoshakalaka MDX support have been implemented. Please try it out.

@ilyaspiridonov
Copy link
Member

@Madoshakalaka To add to Sergey's update, any feedback and comments are appreciated. Please also note whether translations are synced back into your project from GitHub once the PR is merged. With the .md->.mdx renaming that was going on in your repo GitLocalize could not correctly pick up the translations. It should be better now, but let us know if some things look odd.

@siku2
Copy link

siku2 commented Jan 23, 2022

I'm happy to report that we're seeing MDX files from newly added paths. Unfortunately, there's still some weirdness going on with existing project paths.
For instance, I would like to remove the source website/versioned_docs/version-0.18.0 because there's a newer one with just website/versioned_docs, but the update is rejected. The path simply shows up again after submitting the changes. The folder also no longer appears in the file explorer.
Additionally, there are still a lot of cases where the website/docs path only shows .md files and no .mdx files at all.

I don't mind re-creating the project if that's what it takes, but I figured you might want to take a look at this first.

@svasilenkov
Copy link

@siku2 Yes, It would be much better if you could recreate the project, it should help to solve the problems you are facing at the moment.

@0sophy1
Copy link

0sophy1 commented Sep 22, 2023

@ilyaspiridonov Hope you are well :) we are also looking for a translation for .mdx now. can you share your latest status on this issue?

@ilyaspiridonov
Copy link
Member

@0sophy1 do you already have sample mdx files in your current project, and the main question - are they going to have formulas? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants