Skip to content

feat(ipa): Register IPA components in global MDX scope#60

Merged
andmatei merged 4 commits into
mainfrom
andmatei/ipa-mdx-global-components
Jun 15, 2026
Merged

feat(ipa): Register IPA components in global MDX scope#60
andmatei merged 4 commits into
mainfrom
andmatei/ipa-mdx-global-components

Conversation

@andmatei

@andmatei andmatei commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

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 test
  • npm run docusaurus:build
  • npm run lint

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).
@andmatei andmatei requested a review from a team as a code owner June 13, 2026 13:03
@andmatei andmatei marked this pull request as draft June 13, 2026 13:07
@andmatei andmatei marked this pull request as ready for review June 13, 2026 23:50
@andmatei andmatei merged commit 61bbbf9 into main Jun 15, 2026
10 checks passed
@andmatei andmatei deleted the andmatei/ipa-mdx-global-components branch June 15, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants