-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoptions.ts
More file actions
125 lines (117 loc) · 3.28 KB
/
options.ts
File metadata and controls
125 lines (117 loc) · 3.28 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import type { ReactNode } from 'react';
/**
* Social media link configuration for the footer
*/
export interface SocialProps {
githubUrl?: string;
twitterUrl?: string;
linkedInUrl?: string;
youtubeUrl?: string;
facebookUrl?: string;
instagramUrl?: string;
}
/**
* Footer configuration for the theme
*/
export interface FooterConfig {
/** Description text shown in the footer */
description?: string;
/** Social media links */
socialProps?: SocialProps;
/** Documentation section links (as ReactNode for JSX support) */
documentationLinks?: ReactNode[];
/** Community section links */
communityLinks?: ReactNode[];
/** Resources section links */
resourceLinks?: ReactNode[];
}
/**
* Star banner configuration
*/
export interface StarBannerConfig {
/** GitHub repository URL */
repoUrl: string;
/** Label text for the star button */
label: string;
/** Only show banner when the current path starts with this prefix (e.g. '/docs/openziti') */
pathPrefix?: string;
}
/**
* A single link entry in the product picker
*/
export interface ProductPickerLink {
/** Display name */
label: string;
/** Route or URL */
to: string;
/** Logo shown in light mode (and dark mode if logoDark is absent) */
logo?: string;
/** Logo shown only in dark mode */
logoDark?: string;
/** Short description shown beneath the label */
description?: string;
}
/**
* A column in the product picker dropdown.
* Header color is assigned automatically by column index (primary → secondary → tertiary).
*/
export interface ProductPickerColumn {
/** Column heading text */
header: string;
links: ProductPickerLink[];
}
/**
* Options passed to the theme plugin in docusaurus.config.ts
*
* @example
* ```ts
* themes: [
* ['@netfoundry/docusaurus-theme', {
* customCss: require.resolve('./src/css/custom.css'),
* }],
* ],
* ```
*/
export interface NetFoundryThemeOptions {
/** Custom CSS file path(s) to include */
customCss?: string | string[];
}
/**
* Theme configuration in themeConfig.netfoundry
*
* @example
* ```ts
* themeConfig: {
* netfoundry: {
* footer: {
* description: 'My site description',
* socialProps: {
* githubUrl: 'https://github.com/my-org/repo',
* },
* },
* starBanner: {
* repoUrl: 'https://github.com/my-org/repo',
* label: 'Star us on GitHub',
* },
* showStarBanner: true,
* },
* },
* ```
*/
export interface NetFoundryThemeConfig {
/** Footer configuration */
footer?: FooterConfig;
/** Path-aware star banners — each entry shows only when the current path starts with pathPrefix (omit pathPrefix to show everywhere) */
starBanners?: StarBannerConfig[];
/** Product picker columns. If omitted, the theme falls back to built-in NetFoundry defaults. */
productPickerColumns?: ProductPickerColumn[];
/** Logo URL for the NetFoundry Console link in the product picker (overrides the default NetFoundry branding icon) */
consoleLogo?: string;
}
/**
* Extended Docusaurus ThemeConfig with NetFoundry configuration
*/
export interface ThemeConfigWithNetFoundry {
netfoundry?: NetFoundryThemeConfig;
[key: string]: unknown;
}