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

please add mdx support #131

Open
diomed opened this issue Sep 27, 2023 · 9 comments
Open

please add mdx support #131

diomed opened this issue Sep 27, 2023 · 9 comments

Comments

@diomed
Copy link
Contributor

diomed commented Sep 27, 2023

MDX allows you to use variables, JSX expressions and components within Markdown content in Astro.

More on it:
https://github.com/withastro/astro/tree/main/packages/integrations/mdx#why-mdx

@fchrapek
Copy link

fchrapek commented Sep 27, 2023

Hi @diomed, Astro has really decent documentation. Just follow the steps here: https://docs.astro.build/en/guides/integrations-guide/mdx/ and you should be good to go.

EDIT: Ok, I didn't check your link. I'm linking the same stuff. Do you have trouble integrating the MDX?

@diomed
Copy link
Contributor Author

diomed commented Sep 27, 2023

unsure why it wouldnt come out of the box

@fchrapek
Copy link

@diomed Hmm, perhaps MDX might be an overkill if you want a simple blog with just text + images. Especially when Astro supports MD images optimization. Maybe that was the initial idea.

Let's wait for the @satnaing to respond.

To be clear, I'm with you when it comes to using MDX. Is some contexts, MD is too limited.

@diomed
Copy link
Contributor Author

diomed commented Sep 27, 2023

@fchrapek hey , are you on Discord?

@fchrapek
Copy link

@diomed nope

@satnaing
Copy link
Owner

satnaing commented Oct 3, 2023

Just like @fchrapek mentioned, I think it is a little bit overkill for average users who simply want to display content in their blog posts.
Initially, AstroPaper was intended to be a minimal blog template without extensive features, which is why I didn't include MDX support by default.
Moreover, I assume the template users can easily integrate MDX themselves if they wish.

However, there are two options to address this issue:

  1. add a blog post (docs) for integrating AstroPaper with MDX
  2. add MDX out of the box

What do you think?

@diomed
Copy link
Contributor Author

diomed commented Oct 3, 2023

you could replace old blog post for forestry cms with this one, since forestry doesnt exist anymore. unless it's just updatable for tina cms ¯_(ツ)_/¯

@paultman
Copy link

Agreed that it's nice to have astro-paper lean, yet extendable via integrations already built for astro.
Personally I prefer markdoc over MDX, however as we all have different tools, I'm happier setting it up myself, or using an .astro page over .md when needed.

@mdmrk
Copy link
Contributor

mdmrk commented Nov 10, 2023

I tried adding MDX following astro docs, but it only renders components in some builds processes. it looks like some kind of race condition to me.

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