MDX component overrides #1107
synecdokey
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
Thank you for sharing the use case! Noting an overlap with this issue: delucis/astro-auto-import#30 Both would allow ways to automatically add component overrides to your MDX without using the Implementing in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.12.1
What is your idea?
Enabling global overrides for MDX components, rather than just the starlight ones.
Why is this feature necessary?
Anyone with a need to replace the default handling of MDX components systematically would benefit.
In my specific case, I want to be able to provide a way to create interactive code snippets, but importing the component in each file when the code block element could do the trick is somewhat repetitive, and doesn't really show up nicely on GitHub/gitlab previews (Since you are using a
<Component />
rather than a set of backticks). Or it could be a simple copy button on the same code block.Not having a way to support those in a declarative and systematic manner makes it hard to do these sweeping changes in a way that fits an existing workflow.
Do you have examples of this feature in other projects?
Participation
Beta Was this translation helpful? Give feedback.
All reactions