What version of astro are you using?
1.4.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
linux
Describe the Bug
If you render an MDX page directly, you can export const components = { h1: Title } and get your h1-headings rendered with your custom component. The docs say, you can also pass components in via the components prop (https://docs.astro.build/en/guides/integrations-guide/mdx/#custom-components-with-imported-mdx), but actually it works only if you pass them in via the prop. Have a look at the following repro:
I think, this is not according to the docs, inconsistent and hence unintuitive.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-cvbuxz-ys5fyv?file=src/pages/mdx-through.astro
Participation
What version of
astroare you using?1.4.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
linux
Describe the Bug
If you render an MDX page directly, you can
export const components = { h1: Title }and get your h1-headings rendered with your custom component. The docs say, you can also pass components in via thecomponentsprop (https://docs.astro.build/en/guides/integrations-guide/mdx/#custom-components-with-imported-mdx), but actually it works only if you pass them in via the prop. Have a look at the following repro:I think, this is not according to the docs, inconsistent and hence unintuitive.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-cvbuxz-ys5fyv?file=src/pages/mdx-through.astro
Participation