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

+19
View File
@@ -1,4 +1,6 @@
import { LandingNav } from '@/components/landing/LandingNav';
import { buildMetadata } from '@/lib/metadata';
import type { Metadata } from 'next';
const channels = [
{
@@ -58,6 +60,23 @@ const i18n = {
},
};
export async function generateMetadata({
params,
}: {
params: Promise<{ lang: string }>;
}): Promise<Metadata> {
const { lang } = await params;
const l = lang === 'cn' ? 'cn' : 'en';
const t = i18n[l];
return buildMetadata({
title: t.title,
description: t.desc,
path: `/${l}/community`,
lang: l,
});
}
export default async function CommunityPage({ params }: { params: Promise<{ lang: string }> }) {
const { lang } = await params;
const l = lang === 'cn' ? 'cn' : 'en';