diff --git a/apps/docs/app/[lang]/[[...slug]]/page.tsx b/apps/docs/app/[lang]/[[...slug]]/page.tsx index 150326afb95..94b9531ec12 100644 --- a/apps/docs/app/[lang]/[[...slug]]/page.tsx +++ b/apps/docs/app/[lang]/[[...slug]]/page.tsx @@ -6,11 +6,9 @@ import { createAPIPage } from 'fumadocs-openapi/ui' import { Pre } from 'fumadocs-ui/components/codeblock' import defaultMdxComponents from 'fumadocs-ui/mdx' import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page' -import { ChevronLeft, ChevronRight } from 'lucide-react' -import Link from 'next/link' import { notFound } from 'next/navigation' +import { PageFooter } from '@/components/docs-layout/page-footer' import { PageNavigationArrows } from '@/components/docs-layout/page-navigation-arrows' -import { TOCFooter } from '@/components/docs-layout/toc-footer' import { LLMCopyButton } from '@/components/page-actions' import { StructuredData } from '@/components/structured-data' import { CodeBlock } from '@/components/ui/code-block' @@ -23,6 +21,15 @@ import { type PageData, source } from '@/lib/source' const SUPPORTED_LANGUAGES: Set = new Set(i18n.languages) const BASE_URL = 'https://docs.sim.ai' +const OG_LOCALE_MAP: Record = { + en: 'en_US', + es: 'es_ES', + fr: 'fr_FR', + de: 'de_DE', + ja: 'ja_JP', + zh: 'zh_CN', +} + function resolveLangAndSlug(params: { slug?: string[]; lang: string }) { const isValidLang = SUPPORTED_LANGUAGES.has(params.lang) const lang = isValidLang ? params.lang : 'en' @@ -120,101 +127,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l } const breadcrumbs = generateBreadcrumbs() - - const CustomFooter = () => ( -
-
- {neighbours?.previous ? ( - - - {neighbours.previous.name} - - ) : ( -
- )} - - {neighbours?.next ? ( - - {neighbours.next.name} - - - ) : ( -
- )} -
- -
- -
- -
- - -
- - -
- -
-
- ) + const footer = if (isOpenAPI && data.getAPIPageProps) { const apiProps = data.getAPIPageProps() @@ -233,7 +146,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l lang={lang} breadcrumb={breadcrumbs} /> - , + component: footer, }} >
@@ -259,7 +171,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
- {data.title} + {data.title} {data.description}
@@ -291,7 +203,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l tableOfContent={{ style: 'clerk', enabled: true, - footer: , single: false, }} tableOfContentPopover={{ @@ -300,7 +211,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l }} footer={{ enabled: true, - component: , + component: footer, }} >
@@ -310,7 +221,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
- {data.title} + {data.title} {data.description}
@@ -393,10 +304,10 @@ export async function generateMetadata(props: { url: fullUrl, siteName: 'Sim Documentation', type: 'article', - locale: lang === 'en' ? 'en_US' : `${lang}_${lang.toUpperCase()}`, - alternateLocale: ['en', 'es', 'fr', 'de', 'ja', 'zh'] + locale: OG_LOCALE_MAP[lang] ?? 'en_US', + alternateLocale: i18n.languages .filter((l) => l !== lang) - .map((l) => (l === 'en' ? 'en_US' : `${l}_${l.toUpperCase()}`)), + .map((l) => OG_LOCALE_MAP[l] ?? 'en_US'), images: [ { url: ogImageUrl, @@ -416,17 +327,6 @@ export async function generateMetadata(props: { creator: '@simdotai', site: '@simdotai', }, - robots: { - index: true, - follow: true, - googleBot: { - index: true, - follow: true, - 'max-video-preview': -1, - 'max-image-preview': 'large', - 'max-snippet': -1, - }, - }, canonical: fullUrl, alternates: { canonical: fullUrl, diff --git a/apps/docs/app/[lang]/layout.tsx b/apps/docs/app/[lang]/layout.tsx index e6a46813e74..5f9ca80cdd1 100644 --- a/apps/docs/app/[lang]/layout.tsx +++ b/apps/docs/app/[lang]/layout.tsx @@ -10,7 +10,6 @@ import { SidebarSeparator, } from '@/components/docs-layout/sidebar-components' import { Navbar } from '@/components/navbar/navbar' -import { AnimatedBlocks } from '@/components/ui/animated-blocks' import { SimLogoFull } from '@/components/ui/sim-logo' import { i18n } from '@/lib/i18n' import { source } from '@/lib/source' @@ -103,13 +102,12 @@ export default async function Layout({ children, params }: LayoutProps) {