feat(ipa): Register IPA components in global MDX scope#60
Merged
Conversation
Swizzle theme/MDXComponents to add <Guidelines>, <Guideline>, <Example>, and <Workflow> to Docusaurus' global MDX scope, so guideline documents can use them without an import line in every file. PrincipleHeader is omitted — it is auto-injected from frontmatter by the DocItem/Content swizzle. Add a unit test asserting the components are registered and the original theme components preserved. Aliasing @theme-original/MDXComponents to a stub in vitest.config lets the swizzle be imported under vitest (the alias is build-generated and absent at test time).
yelizhenden-mdb
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make the IPA MDX authoring components global:
<Guidelines><Guideline><Example><Workflow>Why
Guideline docs can use the component format without repeated imports.
Verification
npm testnpm run docusaurus:buildnpm run lint