docs icon indicating copy to clipboard operation
docs copied to clipboard

[md/mdx] More MDX to Markdown page

Open sarah11918 opened this issue 2 years ago • 4 comments

  • New or updated content

Another pass bringing more MDX to the forefront, including renaming the page title. Also some small edits throughout.

It's not the canonical source for all the MDX info, but it's more like the "quick start" version to show it can be used pretty much just like standard Markdown files, with lots of links to all the integration details and the differences. It's a good "first place" for people to be exposed to the MDX option, alongside reading about Markdown, because so many of the "built-in" basics work the same.

sarah11918 avatar Aug 08 '22 13:08 sarah11918

Deploy Preview for astro-docs-2 ready!

Name Link
Latest commit f4dd44bab73f623799694170a4b97ab20ba10c62
Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/62fb8a9d6a58f200087d0307
Deploy Preview https://deploy-preview-1228--astro-docs-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 08 '22 13:08 netlify[bot]

Hi @sarah11918, one thing I really like about MDX is that you can pass custom components for default html elements (h1/6, img, a, code, pre, etc.) with export const components = {}. The names comes from the Table of Components for MDX.

There's an example of it here, but could be nice to highlight in the docs: https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-mdx?file=src%2Fpages%2Findex.mdx

Would you welcome an additional section in the MDX integration guide?

kylebutts avatar Aug 08 '22 18:08 kylebutts

Hey @kylebutts! Can you make a Docs Issue asking this (since, as you've already noted, we're keeping most of the non-basic MDX stuff on the Integrations page itself, not here on this page) and tag Ben "bholmesdev" on it? I'd like him to weigh in on this, since he's doing all the MDX stuff right now (and I don't want to bother him with a ping to this PR). That's the best way to keep this conversation organized! Thanks!

sarah11918 avatar Aug 08 '22 18:08 sarah11918

Ok, @delucis @Yan-Thomas, after incorporating this with the multiple changes this page has gone through, I think the PR now just adds "and MDX" in all the appropriate places where I felt it should be prominent.

Other than one existing phrase that it sounds like we could improve ("In Astro...."), does this otherwise serve that purpose of just bringing more MDX to the party? More Markdown/MDX planning/discussion to come separately!

sarah11918 avatar Aug 15 '22 19:08 sarah11918