Skip to content
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

Support .mdx files #16

Closed
deadcoder0904 opened this issue Mar 16, 2024 · 7 comments
Closed

Support .mdx files #16

deadcoder0904 opened this issue Mar 16, 2024 · 7 comments

Comments

@deadcoder0904
Copy link

I sometimes use .mdx to write markdown.

It allows for JSX too.

Would love if Marker supports that.

@edbrannin
Copy link

[Not a maintainer]

When you use MDX outside a React project or static site generator, where do the components come from?

@deadcoder0904
Copy link
Author

you either import them just like you import js functions using "../components/CodeBlock.tsx" relative paths or "@/components/CodeBlock.tsx" absolute path. watch this video to see a demo.

for me, i personally like writing .md but always use .mdx files so i guess a simple support would be cool as it could require only adding one more item to array [".md", ".mdx"] instead of [".md"].

@deadcoder0904
Copy link
Author

oopsie, just re-read your question.

i don't use it outside reactjs lol.

my blog is in nextjs so i just write stuff in it using .md but the extensions are .mdx for some syntax styles.

@tk04
Copy link
Owner

tk04 commented Mar 21, 2024

Our editor only supports markdown content. MDX syntax is not supported, so it doesn't make sense to allow you to load .mdx files in the app.

@tk04 tk04 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
@deadcoder0904
Copy link
Author

@tk04 you only need to change the place where you load .mdx file & load it just like .md. yes, it'll be half-assed but still it'll work.

i guess you probably have a glob for loading .md, you can add .md|.mdx :)

@edbrannin
Copy link

@deadcoder0904 Considering the editor apparently also clobbers HTML (#13) I can't say I'm surprised.

Even if you used Marker to edit a React project's mdx files, it would probably drop the React markup anyway.

@deadcoder0904
Copy link
Author

whoops, will stick with sublime :)

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

3 participants