-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.config.tsx
More file actions
46 lines (39 loc) · 1.61 KB
/
theme.config.tsx
File metadata and controls
46 lines (39 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React, { FC } from 'react'
import { DocsThemeConfig } from 'nextra-theme-docs'
import dynamic from 'next/dynamic'
// Pagefind's UI is pure client-side; load it after hydration to keep SSG happy.
const DynamicSearch = dynamic(() => import('./components/Search'), { ssr: false })
const Search: FC<{ className?: string }> = (props) => <DynamicSearch {...props} />
const config: DocsThemeConfig = {
logo: <span><strong>IMKIT Platform API</strong></span>,
project: {
link: 'https://github.com/imkit/api-doc',
},
docsRepositoryBase: 'https://github.com/imkit/api-doc',
// 國際化配置
i18n: [
{ locale: 'zh-TW', name: '繁體中文' },
{ locale: 'zh-CN', name: '简体中文' },
{ locale: 'en', name: 'English' },
{ locale: 'ja', name: '日本語' },
{ locale: 'ko', name: '한국어' }
],
// 使用 Pagefind 取代 Nextra 內建 Flexsearch:中文分詞更好、完全靜態、無第三方依賴
search: {
component: Search,
},
// SEO 配置
head: ({ title }: { title?: string }) => (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content={title ? `${title} - IMKIT` : 'IMKIT Platform API'} />
<meta property="og:description" content="IMKIT Platform API Document" />
<title>{title ? `${title} - IMKIT` : 'IMKIT Platform API'}</title>
<link rel="icon" type="image/png" href="/favicon.png" />
</>
),
footer: {
component: <div style={{ display: 'flex', justifyContent: 'flex-end', padding: '1rem 2rem' }}>© 2026 FUNTEK Software Inc. All rights reserved.</div>
}
}
export default config