satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.39k stars 502 forks source link

please add mdx support #131

Open diomed opened 1 year ago

diomed commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

unsure why it wouldnt come out of the box

fchrapek commented 1 year ago

@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 commented 1 year ago

@fchrapek hey , are you on Discord?

fchrapek commented 1 year ago

@diomed nope

satnaing commented 1 year ago

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 commented 1 year ago

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 commented 11 months ago

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 commented 10 months ago

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.