mdx-component.tsx
Sometimes there's questions raised by beginners confused about where to add MDX components.
Although it's simply located in page.tsx
which shouldn't be difficult to find, I think some kind of conventions may help, so I decided to add back mdx-components.tsx
.
I love to have fewer files, but considering create-fumadocs-app
should also act as a starting point for beginners who may not familiar with MDX, it's such more helpful to provide it by default.
Existing Projects
The convention is optional (only to make the learning curve smoother). For existing users, you probably knew how to pass MDX components, and no further change is needed.
But you can still make one:
And use it in your MDX component.
Deprecating <I18nProvider />
We now prefer a single <RootProvider />
for everything, replacing the need of <I18nProvider />
with a i18n
prop.
This allows Root Provider to handle the hierarchy correctly without revealing too much complexity, for example, the correct order should be:
Changing the hierarchy of different providers may result in problems since they actually rely on each other, now it is all integrated into <RootProvider />
, including I18n configuration.
The new Internationalization guide requires Fumadocs 15.2.3 or above.
Written by
Fuma Nama
At
Tue Apr 08 2025