Skip to content

Commit 01d0da9

Browse files
committed
Move docs homepage content into MDX
1 parent 50c2797 commit 01d0da9

File tree

4 files changed

+128
-119
lines changed

4 files changed

+128
-119
lines changed

doc/app/home-page.mdx

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import Link from 'next/link'
2+
import {
3+
capabilityCards,
4+
heroProofPoints,
5+
homeEntryCards,
6+
readingPath,
7+
siteConfig
8+
} from '../lib/site'
9+
10+
<main className="docs-home">
11+
<header className="home-topbar">
12+
<Link href="/" className="home-brand">
13+
<strong>{siteConfig.productName}</strong>
14+
<span>Docs</span>
15+
</Link>
16+
17+
<nav className="home-topbar-nav" aria-label="Primary">
18+
<Link href="/docs">文档</Link>
19+
<a href={siteConfig.repoUrl} target="_blank" rel="noreferrer">
20+
GitHub
21+
</a>
22+
</nav>
23+
</header>
24+
25+
<section className="home-hero">
26+
<div className="home-hero-copy motion-rise">
27+
<p className="section-kicker">Documentation</p>
28+
<h1>面向多 AI 工具的 prompt 与 config sync 文档。</h1>
29+
<p className="home-hero-lead">
30+
{siteConfig.productName}
31+
{' '}
32+
以 MDX 维护源内容,通过 Rust-first / NAPI-first pipeline 将 prompts、rules、skills、commands
33+
与 workspace memory 物化为目标工具原生配置。
34+
</p>
35+
36+
<div className="home-actions">
37+
<Link href="/docs" className="hero-button hero-button-primary">
38+
打开文档
39+
</Link>
40+
<a href={siteConfig.repoUrl} target="_blank" rel="noreferrer" className="hero-button hero-button-secondary">
41+
查看 GitHub
42+
</a>
43+
<a href={siteConfig.issueUrl} target="_blank" rel="noreferrer" className="hero-button hero-button-secondary">
44+
报告问题
45+
</a>
46+
</div>
47+
48+
<ul className="home-proof-strip" aria-label="Core proof points">
49+
{heroProofPoints.map(point => (
50+
<li key={point.label} className="proof-pill">
51+
<span>{point.label}</span>
52+
<strong>{point.value}</strong>
53+
</li>
54+
))}
55+
</ul>
56+
</div>
57+
</section>
58+
59+
<section className="home-section">
60+
<div className="section-heading">
61+
<p className="section-kicker">Start Here</p>
62+
<h2>从最短路径进入,而不是先读背景叙事</h2>
63+
<p className="section-summary">
64+
首页只负责建立能力边界与入口,具体行为、配置和命令都落回文档页。
65+
</p>
66+
</div>
67+
68+
<div className="home-link-grid motion-stagger">
69+
{homeEntryCards.map(link => (
70+
<Link key={link.href} href={link.href} className="home-link-card">
71+
<strong>{link.title}</strong>
72+
<p>{link.detail}</p>
73+
<span>Open</span>
74+
</Link>
75+
))}
76+
</div>
77+
</section>
78+
79+
<section className="home-section">
80+
<div className="section-heading">
81+
<p className="section-kicker">Capabilities</p>
82+
<h2>文档重点覆盖的能力边界</h2>
83+
<p className="section-summary">
84+
先明确项目能做什么,再进入具体配置字段、命令表面与实现边界。
85+
</p>
86+
</div>
87+
88+
<div className="capability-grid motion-stagger">
89+
{capabilityCards.map(card => (
90+
<article key={card.title} className="capability-card">
91+
<span>{card.label}</span>
92+
<h3>{card.title}</h3>
93+
<p>{card.detail}</p>
94+
</article>
95+
))}
96+
</div>
97+
</section>
98+
99+
<section className="home-section">
100+
<div className="section-heading">
101+
<p className="section-kicker">Recommended Path</p>
102+
<h2>按这条路线进入,能最快建立正确心智模型</h2>
103+
<p className="section-summary">
104+
路线从运行前提开始,经过源文件模型,最后落到 dry-run、同步与边界验证。
105+
</p>
106+
</div>
107+
108+
<div className="reading-path-grid motion-stagger">
109+
{readingPath.map(item => (
110+
<Link key={item.href} href={item.href} className="reading-path-card">
111+
<small>{item.step}</small>
112+
<strong>{item.title}</strong>
113+
<p>{item.description}</p>
114+
</Link>
115+
))}
116+
</div>
117+
</section>
118+
</main>

doc/app/page.tsx

Lines changed: 2 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,5 @@
1-
import Link from 'next/link'
2-
import {
3-
capabilityCards,
4-
heroProofPoints,
5-
homeEntryCards,
6-
readingPath,
7-
siteConfig
8-
} from '../lib/site'
1+
import HomePageContent from './home-page.mdx'
92

103
export default function HomePage() {
11-
return (
12-
<main className="docs-home">
13-
<header className="home-topbar">
14-
<Link href="/" className="home-brand">
15-
<strong>{siteConfig.productName}</strong>
16-
<span>Docs</span>
17-
</Link>
18-
19-
<nav className="home-topbar-nav" aria-label="Primary">
20-
<Link href="/docs">文档</Link>
21-
<a href={siteConfig.repoUrl} target="_blank" rel="noreferrer">
22-
GitHub
23-
</a>
24-
</nav>
25-
</header>
26-
27-
<section className="home-hero">
28-
<div className="home-hero-copy motion-rise">
29-
<p className="section-kicker">Documentation</p>
30-
<h1>面向多 AI 工具的 prompt 与 config sync 文档。</h1>
31-
<p className="home-hero-lead">
32-
{siteConfig.productName}
33-
{' '}
34-
以 MDX 维护源内容,通过 Rust-first / NAPI-first pipeline 将 prompts、rules、skills、commands
35-
与 workspace memory 物化为目标工具原生配置。
36-
</p>
37-
38-
<div className="home-actions">
39-
<Link href="/docs" className="hero-button hero-button-primary">
40-
打开文档
41-
</Link>
42-
<a href={siteConfig.repoUrl} target="_blank" rel="noreferrer" className="hero-button hero-button-secondary">
43-
查看 GitHub
44-
</a>
45-
<a href={siteConfig.issueUrl} target="_blank" rel="noreferrer" className="hero-button hero-button-secondary">
46-
报告问题
47-
</a>
48-
</div>
49-
50-
<ul className="home-proof-strip" aria-label="Core proof points">
51-
{heroProofPoints.map(point => (
52-
<li key={point.label} className="proof-pill">
53-
<span>{point.label}</span>
54-
<strong>{point.value}</strong>
55-
</li>
56-
))}
57-
</ul>
58-
</div>
59-
</section>
60-
61-
<section className="home-section">
62-
<div className="section-heading">
63-
<p className="section-kicker">Start Here</p>
64-
<h2>从最短路径进入,而不是先读背景叙事</h2>
65-
<p className="section-summary">
66-
首页只负责建立能力边界与入口,具体行为、配置和命令都落回文档页。
67-
</p>
68-
</div>
69-
70-
<div className="home-link-grid motion-stagger">
71-
{homeEntryCards.map(link => (
72-
<Link key={link.href} href={link.href} className="home-link-card">
73-
<strong>{link.title}</strong>
74-
<p>{link.detail}</p>
75-
<span>Open</span>
76-
</Link>
77-
))}
78-
</div>
79-
</section>
80-
81-
<section className="home-section">
82-
<div className="section-heading">
83-
<p className="section-kicker">Capabilities</p>
84-
<h2>文档重点覆盖的能力边界</h2>
85-
<p className="section-summary">
86-
先明确项目能做什么,再进入具体配置字段、命令表面与实现边界。
87-
</p>
88-
</div>
89-
90-
<div className="capability-grid motion-stagger">
91-
{capabilityCards.map(card => (
92-
<article key={card.title} className="capability-card">
93-
<span>{card.label}</span>
94-
<h3>{card.title}</h3>
95-
<p>{card.detail}</p>
96-
</article>
97-
))}
98-
</div>
99-
</section>
100-
101-
<section className="home-section">
102-
<div className="section-heading">
103-
<p className="section-kicker">Recommended Path</p>
104-
<h2>按这条路线进入,能最快建立正确心智模型</h2>
105-
<p className="section-summary">
106-
路线从运行前提开始,经过源文件模型,最后落到 dry-run、同步与边界验证。
107-
</p>
108-
</div>
109-
110-
<div className="reading-path-grid motion-stagger">
111-
{readingPath.map(item => (
112-
<Link key={item.href} href={item.href} className="reading-path-card">
113-
<small>{item.step}</small>
114-
<strong>{item.title}</strong>
115-
<p>{item.description}</p>
116-
</Link>
117-
))}
118-
</div>
119-
</section>
120-
</main>
121-
)
4+
return <HomePageContent />
1225
}

doc/mdx.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare module '*.mdx' {
2+
import type {ComponentType} from 'react'
3+
4+
const MDXComponent: ComponentType<Record<string, unknown>>
5+
6+
export default MDXComponent
7+
}

doc/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"include": [
3030
"next-env.d.ts",
31+
"**/*.d.ts",
3132
"**/*.ts",
3233
"**/*.tsx",
3334
"**/*.mdx",

0 commit comments

Comments
 (0)