-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add custom components to mdx integration guide #4530
Conversation
🦋 Changeset detectedLatest commit: 27c7a84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Thanks for the thorough issue and PR! Have some comments on wondering and examples (most of them minor), but I'm open to feedback on any of these edits 👍
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
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 think this is a FABULOUS addition to the docs, @kylebutts! 🥳
I've left some suggestions for you and @bholmesdev to consider, mostly to integrate with existing Docs conventions. Looking forward to seeing this included! 🚀
@sarah11918 @bholmesdev I incorporated all your feedback and left open the two conversations. They are incorporated in my commit, but left the convos for you to look over as you reference |
packages/integrations/mdx/README.md
Outdated
</blockquote> | ||
``` | ||
|
||
But what if you want to specify your own markup for these blockquotes? In the above example, you could create a custom `<Blockquote />` component (in any language) that has either a `<slot />` component or accepts a `children` prop. MDX provides a way to tap into this rendering and use your own custom components. In the above example, you could create a custom Blockquote component (in any language) that has either a `<slot />` component or accepts a `children` prop. |
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.
But what if you want to specify your own markup for these blockquotes? In the above example, you could create a custom `<Blockquote />` component (in any language) that has either a `<slot />` component or accepts a `children` prop. MDX provides a way to tap into this rendering and use your own custom components. In the above example, you could create a custom Blockquote component (in any language) that has either a `<slot />` component or accepts a `children` prop. | |
But what if you want to specify your own markup for these blockquotes? In the above example, you could create a custom `<Blockquote />` component (in any language) that either has a `<slot />` component or accepts a `children` prop. |
Thanks for incorporating the comments @kylebutts! It looks like there's some copy here twice? So I'll clean this up and then happy for you and @bholmesdev to edit for nuance/reasonableness.
Note, making some editorial decisions based strictly on formatting here, so not meant to disapprove of any previous language. I just don't like how it looks to write plural tags and stuff.
EDIT: Now I care less about changing "blockquotes" because that's how we would refer to the Markdown syntax. So, I'm reverting that. (Change it to <blockquote> elements
if you prefer, but it's fine as is.)
Made a quick commit to remove duplicate text, but unresolved the convo in case either of you still want to edit it! I think I'll be happy with whatever y'all go with from here. Thanks for making some little changes for fitting in with existing Docs! |
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.
Just need a patch
changeset and we're good to go! Yes, a little overkill for README changes, but it should keep our package releases in-check. Instructions on adding changesets here
All set! |
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.
Done! Ready to merge 🚀
Changes
Following withastro/docs#1234, I've added a section to the integration guide on custom components in MDX
Docs
This should be automatically pulled into the docs according to: withastro/docs#1426