Implement internationalization in pages and update CMS clients
The commit mainly revamps the code to support internationalization in various pages like pricing, docs, blog, etc. It modifies the code to generate metadata asynchronously, accommodating internationalized page titles and subtitles. Also, the commit restructures CMS Client scripts, particularly for ContentLayer and Wordpress. For Wordpress, it updates API fetch routes and handles embedded children data. Furthermore, unnecessary logging statements are cleaned up, and minor updates are done for better UI and code efficiency.
This commit is contained in:
16
packages/cms/contentlayer/src/mdx-renderer.tsx
Normal file
16
packages/cms/contentlayer/src/mdx-renderer.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { MDXComponents as MDXComponentsType } from 'mdx/types';
|
||||
import { getMDXComponent } from 'next-contentlayer/hooks';
|
||||
|
||||
import { MDXComponents } from '@kit/ui/mdx-components';
|
||||
|
||||
export function Mdx({
|
||||
code,
|
||||
}: React.PropsWithChildren<{
|
||||
code: string;
|
||||
}>) {
|
||||
const Component = getMDXComponent(code);
|
||||
|
||||
return (
|
||||
<Component components={MDXComponents as unknown as MDXComponentsType} />
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user