From ad100fa871b4d70550dbc3d1d5ddfcc51442fdbf Mon Sep 17 00:00:00 2001 From: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com> Date: Tue, 7 Apr 2026 11:05:58 -0700 Subject: [PATCH] improvement(docs): ui/ux cleanup (#4016) * improvement(landing, blog): SEO and GEO optimization * improvement(docs): ui/ux cleanup * chore(blog): remove unused buildBlogJsonLd export and wordCount schema field * fix(blog): stack related posts vertically on mobile and fill all suggestion slots - Add flex-col sm:flex-row and matching border classes to related posts nav for consistent mobile stacking with the main blog page - Remove score > 0 filter in getRelatedPosts so it falls back to recent posts when there aren't enough tag matches - Align description text color with main page cards --- apps/docs/app/[lang]/[[...slug]]/page.tsx | 136 +-- apps/docs/app/[lang]/layout.tsx | 4 +- apps/docs/app/favicon.ico | Bin 0 -> 2191 bytes apps/docs/app/global.css | 868 +++++++++++++++--- apps/docs/app/layout.tsx | 17 +- apps/docs/app/robots.txt/route.ts | 1 - apps/docs/app/sitemap.xml/route.ts | 7 +- .../components/docs-layout/page-footer.tsx | 102 ++ .../docs-layout/page-navigation-arrows.tsx | 4 +- .../docs-layout/sidebar-components.tsx | 188 ++-- .../components/docs-layout/toc-footer.tsx | 39 - apps/docs/components/navbar/navbar.tsx | 31 +- apps/docs/components/page-actions.tsx | 2 +- apps/docs/components/structured-data.tsx | 43 +- apps/docs/components/ui/block-info-card.tsx | 27 +- apps/docs/components/ui/button.tsx | 2 +- apps/docs/components/ui/code-block.tsx | 1 + apps/docs/components/ui/dropdown-menu.tsx | 14 +- apps/docs/components/ui/faq.tsx | 93 +- apps/docs/components/ui/heading.tsx | 2 +- apps/docs/components/ui/image.tsx | 2 +- apps/docs/components/ui/language-dropdown.tsx | 130 +-- apps/docs/components/ui/lightbox.tsx | 2 +- apps/docs/components/ui/search-trigger.tsx | 3 +- apps/docs/components/ui/sim-logo.tsx | 60 +- apps/docs/components/ui/theme-toggle.tsx | 56 +- apps/docs/components/ui/video.tsx | 2 +- apps/docs/content/docs/de/meta.json | 4 + .../content/docs/en/api-reference/meta.json | 1 + .../content/docs/en/getting-started/index.mdx | 4 - .../content/docs/en/knowledgebase/meta.json | 2 +- apps/docs/content/docs/en/meta.json | 4 + apps/docs/content/docs/es/meta.json | 4 + apps/docs/content/docs/fr/meta.json | 4 + apps/docs/content/docs/ja/meta.json | 4 + apps/docs/content/docs/zh/meta.json | 4 + apps/docs/lib/cn.ts | 1 - apps/docs/next.config.ts | 4 +- apps/docs/public/favicon/favicon.ico | Bin 15086 -> 0 bytes apps/docs/public/favicon/favicon.svg | 3 - apps/docs/public/favicon/site.webmanifest | 2 +- apps/docs/public/icon.svg | 1 - apps/docs/source.config.ts | 6 +- .../app/(landing)/blog/[slug]/back-link.tsx | 41 +- .../sim/app/(landing)/blog/[slug]/loading.tsx | 65 +- apps/sim/app/(landing)/blog/[slug]/page.tsx | 175 ++-- .../app/(landing)/blog/authors/[id]/page.tsx | 60 +- apps/sim/app/(landing)/blog/layout.tsx | 13 +- apps/sim/app/(landing)/blog/page.tsx | 94 +- apps/sim/app/(landing)/blog/rss.xml/route.ts | 8 +- apps/sim/app/(landing)/blog/tags/page.tsx | 30 + .../navbar/components/github-stars.tsx | 2 +- apps/sim/app/sitemap.ts | 4 + apps/sim/lib/blog/faq.tsx | 14 +- apps/sim/lib/blog/registry.ts | 15 +- apps/sim/lib/blog/schema.ts | 1 + apps/sim/lib/blog/seo.ts | 45 +- apps/sim/public/llms.txt | 38 + biome.json | 1 + 59 files changed, 1657 insertions(+), 833 deletions(-) create mode 100644 apps/docs/app/favicon.ico create mode 100644 apps/docs/components/docs-layout/page-footer.tsx delete mode 100644 apps/docs/components/docs-layout/toc-footer.tsx delete mode 100644 apps/docs/lib/cn.ts delete mode 100644 apps/docs/public/favicon/favicon.ico delete mode 100644 apps/docs/public/favicon/favicon.svg delete mode 100644 apps/docs/public/icon.svg create mode 100644 apps/sim/public/llms.txt diff --git a/apps/docs/app/[lang]/[[...slug]]/page.tsx b/apps/docs/app/[lang]/[[...slug]]/page.tsx index 150326afb9..94b9531ec1 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 e6a46813e7..5f9ca80cdd 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) {