-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Document passing components to MDX Content #12597
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
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
delucis
left a comment
There was a problem hiding this 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?
sarah11918
left a comment
There was a problem hiding this 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!
|
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! |
|
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 |
|
(Noting two link issues we can address once we've decided on a section heading) |
ArmandPhilippot
left a comment
There was a problem hiding this 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?
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
|
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! |
|
Updating branch to hopefully get a deploy preview |
sarah11918
left a comment
There was a problem hiding this 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.)
yanthomasdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy too!
Description (required)
Documents passing components to MDX
<Content />component.Related issues & labels (optional)
For withastro/astro#14591