-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
80 lines (72 loc) · 1.83 KB
/
config.ts
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import type { FeaturesProps, FooterProps, HeroProps, LogoProps } from '@lobehub/ui';
import { FooterColumn } from 'rc-footer/es/column';
import type { NavData } from '@/store';
import type { SiteCustomToken } from '@/styles/customToken';
import type { HeroConfig } from './hero';
export type Intl =
| 'en-US'
| 'zh-CN'
| 'th-TH'
| 'de-DE'
| 'es-ES'
| 'fr-FR'
| 'it-IT'
| 'ja-JP'
| 'ko-KR'
| 'pt-BR'
| 'ru-RU'
| 'th-TH'
| 'vi-VN';
export interface ApiHeaderConfig {
docUrl?: string | false;
match?: string[];
pkg?: string;
services?: {
'Anvaka Graph'?: boolean;
'BundlePhobia'?: boolean;
'NPM'?: boolean;
'PackagePhobia'?: boolean;
'UNPKG'?: boolean;
};
sourceUrl?: string | false;
type?: 'component' | 'doc';
}
export interface FooterConfig {
bottom?: FooterProps['bottom'];
columns?: FooterProps['columns'];
moreProducts?: FooterColumn;
resources?: FooterColumn;
}
export interface SiteThemeConfig {
actions: Partial<Record<string, HeroProps['actions']>>;
apiHeader?: ApiHeaderConfig | false;
description?: Partial<Record<Intl, string>>;
docStyle?: 'block' | 'pure';
features?: Partial<Record<Intl, FeaturesProps['items']>>;
footer?: string | false;
footerConfig?: FooterConfig;
giscus?: {
category: string;
categoryId: string;
repo: `${string}/${string}`;
repoId: string;
};
hero?: HeroConfig | Record<string, HeroConfig>;
logo?: string;
logoType?: LogoProps['type'];
name?: string;
nav?: Partial<Record<Intl, NavData>>;
simulatorUrl: string;
siteToken?: SiteConfigToken;
socialLinks?: {
discord?: `https://discord.gg/${string}`;
github?: string;
};
title?: string;
}
export type SiteConfigToken = Partial<
Pick<
SiteCustomToken,
'headerHeight' | 'footerHeight' | 'sidebarWidth' | 'tocWidth' | 'contentMaxWidth'
>
>;