feat(docs): add comprehensive SEO optimization for static docs site

Add per-page metadata, Open Graph / Twitter tags, canonical URLs,
hreflang, sitemap generation, robots.txt, and JSON-LD structured data
for the bilingual (en/cn) documentation site.
This commit is contained in:
t8y2 committed 2026-05-28 00:31:34 +08:00
1 parent bd78436ab1
commit 4b9f770534
10 files changed
+391 -7

No files matched your search

+34
View File
@@ -1,4 +1,5 @@
import Link from 'next/link';
import type { Metadata } from 'next';
import type { CSSProperties } from 'react';
import { HeroProductStage } from '@/components/aceternity/HeroProductStage';
import { InfiniteMovingCards } from '@/components/aceternity/InfiniteMovingCards';
@@ -366,6 +367,39 @@ const i18nText = {
},
};
import { buildMetadata } from '@/lib/metadata';
const landingMeta = {
en: {
title: 'DBX - 15 MB to manage 35+ databases!',
description:
'DBX brings connections, SQL editing, data grids, schema tools, AI assistance, and self-hosted access into one lightweight product.',
},
cn: {
title: 'DBX - 15MB,管理35+种数据库!',
description:
'DBX 将连接管理、SQL 编辑、数据表格、结构工具、AI 助手和自托管访问放进一个轻量产品里。',
},
};
export async function generateMetadata({
params,
}: {
params: Promise<{ lang: string }>;
}): Promise<Metadata> {
const { lang } = await params;
const l = lang === 'cn' ? 'cn' : 'en';
const meta = landingMeta[l];
return buildMetadata({
title: meta.title,
description: meta.description,
path: `/${l}`,
lang: l,
ogType: 'website',
});
}
export default async function LandingPage({
params,
}: {