Skip to content

Conversation

@matthewp
Copy link
Contributor

Description (required)

Documents passing components to MDX <Content /> component.

Related issues & labels (optional)

For withastro/astro#14591

@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit fbca07b
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/68fa50848d77c10008a7a042
😎 Deploy Preview https://deploy-preview-12597--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 project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Oct 20, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/content-collections.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/mdx.mdx Source changed, localizations will be marked as outdated.
en/reference/directives-reference.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do already document this here: https://docs.astro.build/en/guides/integrations-guide/mdx/#custom-components-with-imported-mdx

Maybe we can link there? Or tweak it if we need to clarify anything?

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @matthewp , this is a helpful example! See my comments below, including a question making sure it's clear how including the default exports work!

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Oct 21, 2025
@sarah11918
Copy link
Member

Following up, now Chris's comment is appearing for me. I'm going to suggest we keep this content in the MDX page only and perhaps link to it from the content collections page.

Maybe it's the MDX page that needs beefing up so it's obvious that this works in content collections, too!

@sarah11918
Copy link
Member

OK! So I updated both the text on the content collections and the MDX pages so that the main content is all on the MDX page and content collections links to it.

I made this intentionally as big as it could be, showing both a plain "import from MDX" and a content collections example. Would love help fixing up the MDX stuff to make sure it's helpful enough for both scenarios, but not too much! @delucis

@sarah11918
Copy link
Member

(Noting two link issues we can address once we've decided on a section heading)

Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! I left a comment for the heading and another nit because I think "blog posts" might confuse some people?

sarah11918 and others added 2 commits October 21, 2025 10:31
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@sarah11918
Copy link
Member

OK, I addressed Yan's grammar nits, and @ArmandPhilippot , what do you think of this new order/flow? I honestly think this whole thing feels much better in this order!

@sarah11918
Copy link
Member

Updating branch to hopefully get a deploy preview

@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Oct 22, 2025
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with this! (Anyone else still welcome to find things wrong.)

Copy link
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy too!

@sarah11918 sarah11918 merged commit cc5c4f8 into main Oct 23, 2025
10 checks passed
@sarah11918 sarah11918 deleted the mdx-components branch October 23, 2025 16:24
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants