--``` - -But what if you want to specify your own markup for these blockquotes? In the above example, you could create a custom `` component (in any language) that either has a `A blockquote with some emphasis.
-
- “ --``` - -Then in the MDX file you import the component and export it to the `components` export. - -```mdx title="src/pages/posts/post-1.mdx" {2} -import Blockquote from '../components/Blockquote.astro'; -export const components = { blockquote: Blockquote }; -``` - -Now, writing the standard Markdown blockquote syntax (`>`) will use your custom `` component instead. No need to use a component in Markdown, or write a remark/rehype plugin! Visit the [MDX website](https://mdxjs.com/table-of-components/) for a full list of HTML elements that can be overwritten as custom components. - -#### Custom components with imported `mdx` - -When rendering imported MDX content, custom components can be passed via the `components` prop. - -Note: An MDX file's exported components will _not_ be used unless you manually import and pass them via the `components` property. See the example below: - -```astro title="src/pages/page.astro" "components={{...components, h1: Heading }}" ---- -import { Content, components } from '../content.mdx'; -import Heading from '../Heading.astro'; ---- - --