Skip to content

Commit 2a8b7ef

Browse files
ericyangpanclaude
andcommitted
feat: add manifesto page
- Add dedicated manifesto page route - Display manifesto content from MDX files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 284ab8d commit 2a8b7ef

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import { getTranslations } from 'next-intl/server'
2+
import Footer from '@/components/Footer'
3+
import Header from '@/components/Header'
4+
import { Link } from '@/i18n/navigation'
5+
import { getManifestoComponent } from '@/lib/manifesto'
6+
import { buildCanonicalUrl, buildOpenGraph, buildTitle, buildTwitterCard } from '@/lib/metadata'
7+
8+
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }) {
9+
const { locale } = await params
10+
const t = await getTranslations({ locale, namespace: 'pages.manifesto' })
11+
12+
const canonicalPath = locale === 'en' ? '/manifesto' : `/${locale}/manifesto`
13+
const title = buildTitle({ title: t('title') })
14+
const description = t('subtitle')
15+
16+
return {
17+
title,
18+
description,
19+
keywords: 'AI Coding Manifesto, AI development philosophy, AI coding principles',
20+
alternates: {
21+
canonical: canonicalPath,
22+
languages: {
23+
en: '/manifesto',
24+
'zh-Hans': '/zh-Hans/manifesto',
25+
},
26+
},
27+
openGraph: buildOpenGraph({
28+
title: t('title'),
29+
description,
30+
url: buildCanonicalUrl({ path: canonicalPath, locale }),
31+
locale,
32+
type: 'website',
33+
}),
34+
twitter: buildTwitterCard({
35+
title: t('title'),
36+
description,
37+
}),
38+
}
39+
}
40+
41+
type Props = {
42+
params: Promise<{ locale: string }>
43+
}
44+
45+
export default async function ManifestoPage({ params }: Props) {
46+
const { locale } = await params
47+
const t = await getTranslations({ locale, namespace: 'pages.manifesto' })
48+
const tStack = await getTranslations({ locale, namespace: 'stacksPages.overview' })
49+
const ManifestoContent = await getManifestoComponent(locale)
50+
51+
return (
52+
<>
53+
<Header />
54+
55+
<div className="max-w-5xl mx-auto px-[var(--spacing-md)] py-[var(--spacing-lg)]">
56+
<main>
57+
{/* Hero Section */}
58+
<section className="mb-[var(--spacing-2xl)]">
59+
<div className="space-y-[var(--spacing-md)]">
60+
<h1 className="text-[2.5rem] md:text-[2rem] font-bold tracking-[-0.03em] leading-[1.15]">
61+
{t('title')}
62+
</h1>
63+
<div className="bg-[var(--color-hover)] p-[var(--spacing-md)]">
64+
<div className="text-[1.5rem] md:text-[1.25rem] tracking-[-0.01em] font-semibold text-[var(--color-text-secondary)]">
65+
{t('slogan')}
66+
</div>
67+
</div>
68+
</div>
69+
</section>
70+
71+
{/* Manifesto Content */}
72+
<section className="prose prose-neutral dark:prose-invert max-w-none mb-[var(--spacing-xl)]">
73+
<ManifestoContent />
74+
</section>
75+
76+
{/* Explore AI Coding Stack Link */}
77+
<section className="mb-[var(--spacing-xl)]">
78+
<Link
79+
href="/ai-coding-stack"
80+
className="block border border-[var(--color-border)] p-[var(--spacing-md)] hover:border-[var(--color-border-strong)] transition-all hover:-translate-y-1 group"
81+
>
82+
<div className="flex items-center justify-between">
83+
<div>
84+
<h2 className="text-[1.5rem] font-semibold tracking-[-0.02em] mb-[var(--spacing-xs)]">
85+
{tStack('title')}
86+
</h2>
87+
<p className="text-sm text-[var(--color-text-secondary)]">{tStack('subtitle')}</p>
88+
</div>
89+
<span className="text-4xl text-[var(--color-text-muted)] group-hover:text-[var(--color-text)] group-hover:translate-x-2 transition-all">
90+
91+
</span>
92+
</div>
93+
</Link>
94+
</section>
95+
</main>
96+
</div>
97+
98+
<Footer />
99+
</>
100+
)
101+
}

0 commit comments

Comments
 (0)