-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
config.ts
90 lines (84 loc) · 2.04 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
81
82
83
84
85
86
87
88
89
90
import type { FeaturesProps, FooterProps, HeroProps, LogoProps } from '@lobehub/ui';
import { IThemeConfig } from 'dumi/dist/client/theme-api/types';
import { FooterColumn } from 'rc-footer/es/column';
import type { SiteCustomToken } from '@/styles/customToken';
import type { HeroConfig } from './hero';
export interface ApiHeaderConfig {
docUrl?: string | false;
match?: string[];
pkg?: string;
sourceUrl?: string | false;
type?: 'component' | 'doc';
}
export interface FooterConfig {
bottom?: FooterProps['bottom'];
columns?: FooterProps['columns'];
moreProducts?: FooterColumn;
resources?: FooterColumn;
}
export interface SiteThemeConfig extends IThemeConfig {
actions?: HeroProps['actions'];
analytics?: {
clarity?: {
projectId: string;
};
googleAnalytics?: {
measurementId: string;
};
plausible?: {
domain: string;
scriptBaseUrl: string;
};
};
apiHeader?: ApiHeaderConfig | false;
description?: string;
docStyle?: 'block' | 'pure';
features?: FeaturesProps['items'];
footer?: string | false;
footerConfig?: FooterConfig;
giscus?: {
category: string;
categoryId: string;
repo: `${string}/${string}`;
repoId: string;
};
hero?: HeroConfig | Record<string, HeroConfig>;
hideHomeNav?: boolean;
logo?: string;
logoType?: LogoProps['type'];
metadata?: {
description?: string;
icons?: {
apple?: string;
icon?: string;
shortcut?: string;
};
manifest?: string;
openGraph?: {
description?: string;
image?: string;
siteName?: string;
title?: string;
};
title?: string;
twitter?: {
description?: string;
image?: string;
site?: string;
title?: string;
};
};
name?: string;
siteToken?: SiteConfigToken;
socialLinks?: {
discord?: `https://discord.gg/${string}`;
github?: string;
};
title?: string;
}
export type SiteConfigToken = Partial<
Pick<
SiteCustomToken,
'headerHeight' | 'footerHeight' | 'sidebarWidth' | 'tocWidth' | 'contentMaxWidth'
>
>;