feat(website): simplify heading api
This commit is contained in:
@@ -23,7 +23,7 @@ export default function ChromeExtension() {
|
||||
<div className="space-y-8 mt-8">
|
||||
{/* Features */}
|
||||
<section>
|
||||
<Heading id="key-features" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="key-features" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '核心特性' : 'Key Features'}
|
||||
</Heading>
|
||||
<div className="grid md:grid-cols-3 gap-4">
|
||||
@@ -60,7 +60,7 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Install */}
|
||||
<section>
|
||||
<Heading id="get-the-extension" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="get-the-extension" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '获取扩展' : 'Get the Extension'}
|
||||
</Heading>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
@@ -91,11 +91,7 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Relationship with PageAgent.js */}
|
||||
<section>
|
||||
<Heading
|
||||
id="how-it-relates-to-page-agent-js"
|
||||
level={2}
|
||||
className="text-2xl font-bold mb-4"
|
||||
>
|
||||
<Heading id="how-it-relates-to-page-agent-js" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '与 PageAgent.js 的关系' : 'How It Relates to PageAgent.js'}
|
||||
</Heading>
|
||||
<div className="p-5 bg-gray-50 dark:bg-gray-800 rounded-lg space-y-3 text-gray-600 dark:text-gray-300">
|
||||
@@ -114,7 +110,7 @@ export default function ChromeExtension() {
|
||||
|
||||
{/* Third-party Integration */}
|
||||
<section>
|
||||
<Heading id="third-party-integration" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="third-party-integration" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '第三方接入' : 'Third-Party Integration'}
|
||||
</Heading>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
@@ -154,7 +150,7 @@ localStorage.setItem('PageAgentExtUserAuthToken', '<your-token-from-extension>')
|
||||
|
||||
{/* API Reference */}
|
||||
<section>
|
||||
<Heading id="api-reference" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="api-reference" className="text-2xl font-bold mb-4">
|
||||
{isZh ? 'API 参考' : 'API Reference'}
|
||||
</Heading>
|
||||
|
||||
@@ -181,7 +177,7 @@ localStorage.setItem('PageAgentExtUserAuthToken', '<your-token-from-extension>')
|
||||
</section>
|
||||
|
||||
{/* TypeScript Declaration */}
|
||||
<Heading id="typescript-declaration" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="typescript-declaration" className="text-2xl font-bold mb-4">
|
||||
{isZh ? 'TypeScript 类型声明' : 'TypeScript Declaration'}
|
||||
</Heading>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
@@ -317,7 +313,6 @@ window.PAGE_AGENT_EXT.stop()`
|
||||
<section>
|
||||
<Heading
|
||||
id="integrate-multipageagent-into-your-extension"
|
||||
level={2}
|
||||
className="text-2xl font-bold mb-4"
|
||||
>
|
||||
{isZh
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Instructions() {
|
||||
|
||||
{/* System Instructions */}
|
||||
<section className="mb-12">
|
||||
<Heading id="system-instructions" level={2} className="text-3xl font-bold mb-6">
|
||||
<Heading id="system-instructions" className="text-3xl font-bold mb-6">
|
||||
{isZh ? '系统级指导 (System Instructions)' : 'System Instructions'}
|
||||
</Heading>
|
||||
|
||||
@@ -47,7 +47,7 @@ Guidelines:
|
||||
|
||||
{/* Page Instructions */}
|
||||
<section className="mb-12">
|
||||
<Heading id="page-instructions" level={2} className="text-3xl font-bold mb-6">
|
||||
<Heading id="page-instructions" className="text-3xl font-bold mb-6">
|
||||
{isZh ? '页面级指导 (Page Instructions)' : 'Page Instructions'}
|
||||
</Heading>
|
||||
|
||||
@@ -91,7 +91,7 @@ This is the product listing page.
|
||||
|
||||
{/* How It Works */}
|
||||
<section className="mb-12">
|
||||
<Heading id="how-it-works" level={2} className="text-3xl font-bold mb-6">
|
||||
<Heading id="how-it-works" className="text-3xl font-bold mb-6">
|
||||
{isZh ? '工作原理' : 'How It Works'}
|
||||
</Heading>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export default function CustomTools() {
|
||||
|
||||
<div className="space-y-8">
|
||||
<section>
|
||||
<Heading id="tool-registration" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="tool-registration" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '工具注册' : 'Tool Registration'}
|
||||
</Heading>
|
||||
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
||||
@@ -58,7 +58,7 @@ const pageAgent = new PageAgent({customTools})
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<Heading id="page-filter" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="page-filter" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '页面过滤器' : 'Page Filter'}
|
||||
</Heading>
|
||||
|
||||
@@ -94,7 +94,7 @@ const pageAgent = new PageAgent({customTools})
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<Heading id="best-practices" level={2} className="text-2xl font-bold mb-4">
|
||||
<Heading id="best-practices" className="text-2xl font-bold mb-4">
|
||||
{isZh ? '最佳实践' : 'Best Practices'}
|
||||
</Heading>
|
||||
<div className="space-y-4">
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function DataMasking() {
|
||||
</p>
|
||||
|
||||
<section className="mb-12">
|
||||
<Heading id="api-definition" level={2} className="text-3xl font-bold mb-6">
|
||||
<Heading id="api-definition" className="text-3xl font-bold mb-6">
|
||||
{isZh ? '接口定义' : 'API Definition'}
|
||||
</Heading>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function DataMasking() {
|
||||
</section>
|
||||
|
||||
<section className="mb-12">
|
||||
<Heading id="common-masking-patterns" level={2} className="text-3xl font-bold mb-6">
|
||||
<Heading id="common-masking-patterns" className="text-3xl font-bold mb-6">
|
||||
{isZh ? '常用脱敏规则' : 'Common Masking Patterns'}
|
||||
</Heading>
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function Models() {
|
||||
|
||||
{/* Models Section */}
|
||||
<section className="mb-10">
|
||||
<Heading id="tested-models" level={2} className="text-2xl font-semibold mb-3">
|
||||
<Heading id="tested-models" className="text-2xl font-semibold mb-3">
|
||||
{isZh ? '已测试模型' : 'Tested Models'}
|
||||
</Heading>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400 mb-4">
|
||||
@@ -144,9 +144,7 @@ export default function Models() {
|
||||
|
||||
{/* Configuration Section */}
|
||||
<section className="mb-10">
|
||||
<Heading id="configuration" level={2} className="text-2xl font-semibold mb-4">
|
||||
{isZh ? '配置方式' : 'Configuration'}
|
||||
</Heading>
|
||||
<Heading id="configuration">{isZh ? '配置方式' : 'Configuration'}</Heading>
|
||||
<CodeEditor
|
||||
code={`// OpenAI-compatible services (e.g., Alibaba Bailian)
|
||||
const pageAgent = new PageAgent({
|
||||
@@ -168,9 +166,7 @@ const pageAgent = new PageAgent({
|
||||
|
||||
{/* Free Testing API Section */}
|
||||
<section className="mb-10">
|
||||
<Heading id="free-testing-api" level={2} className="text-2xl font-semibold mb-4">
|
||||
{isZh ? '免费测试接口' : 'Free Testing API'}
|
||||
</Heading>
|
||||
<Heading id="free-testing-api">{isZh ? '免费测试接口' : 'Free Testing API'}</Heading>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400 mb-4">
|
||||
{isZh
|
||||
? '以下免费测试接口仅供 PageAgent.js 和 PageAgent Extension 的技术评估使用。有速率限制,可能随时变更。请勿用于生产环境。'
|
||||
@@ -220,9 +216,7 @@ LLM_API_KEY="NA"`}
|
||||
|
||||
{/* Ollama Section */}
|
||||
<section className="mb-10">
|
||||
<Heading id="ollama" level={2} className="text-2xl font-semibold mb-4">
|
||||
Ollama
|
||||
</Heading>
|
||||
<Heading id="ollama">Ollama</Heading>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400 mb-4">
|
||||
{isZh
|
||||
? '已在 Ollama 0.15 + qwen3:14b (RTX3090 24GB) 上测试通过。'
|
||||
|
||||
Reference in New Issue
Block a user