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:
@@ -6,7 +6,7 @@ export const DocsCard: React.FC<
|
||||
React.PropsWithChildren<{
|
||||
title: string;
|
||||
subtitle?: string | null;
|
||||
link?: { url: string; label: string };
|
||||
link: { url: string; label: string };
|
||||
}>
|
||||
> = ({ title, subtitle, children, link }) => {
|
||||
return (
|
||||
@@ -15,11 +15,13 @@ export const DocsCard: React.FC<
|
||||
className={`flex grow flex-col space-y-2.5 border bg-background p-6
|
||||
${link ? 'rounded-t-2xl border-b-0' : 'rounded-2xl'}`}
|
||||
>
|
||||
<h3 className="mt-0 text-lg font-semibold dark:text-white">{title}</h3>
|
||||
<h3 className="mt-0 text-lg font-semibold dark:text-white">
|
||||
<Link href={link.url}>{title}</Link>
|
||||
</h3>
|
||||
|
||||
{subtitle && (
|
||||
<div className="text-sm text-gray-500 dark:text-gray-400">
|
||||
<p>{subtitle}</p>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
<p dangerouslySetInnerHTML={{ __html: subtitle }}></p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export function DocsCards({ pages }: { pages: Cms.ContentItem[] }) {
|
||||
title={item.title}
|
||||
subtitle={item.description}
|
||||
link={{
|
||||
url: item.url,
|
||||
url: `/docs/${item.slug}`,
|
||||
label: 'Read more',
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user