-
Notifications
You must be signed in to change notification settings - Fork 3
/
docusaurus.config.js
311 lines (301 loc) · 10.1 KB
/
docusaurus.config.js
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer').themes.vsLight;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Deepfence Community',
tagline: 'Security Observability for Cloud Native Applications',
url: 'https://community.deepfence.io',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: '/img/deepfence.png',
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: ({ versionDocsDirPath, docPath, locale }) => {
const repoMain = {
threatstryker: 'https://github.com/deepfence/ThreatStryker-docs',
packetstreamer: 'https://github.com/deepfence/PacketStreamer',
flowmeter: 'https://github.com/deepfence/FlowMeter',
yarahunter: 'https://github.com/deepfence/YaraHunter',
ebpfguard: 'https://github.com/deepfence/ebpfguard'
};
const repoMaster = {
threatmapper: 'https://github.com/deepfence/ThreatMapper',
secretscanner: 'https://github.com/deepfence/SecretScanner',
};
var match;
if(( match = docPath.match( /([^\/]*)\/(.*).md/ )) != null ) {
var product = match[1];
var filepath = match[2];
if( repoMain[product] != null ) {
return `${repoMain[product]}/edit/main/docs/docs/${product}/${filepath}.md`;
}
if( repoMaster[product] != null ) {
return `${repoMaster[product]}/edit/master/docs/docs/${product}/${filepath}.md`;
}
}
},
breadcrumbs: true,
routeBasePath: '/docs',
// options for remark-admonitions
admonitions: {},
},
blog: false,
theme: {
customCss: require.resolve('./static/css/deepfence.css'),
},
gtag: {
trackingID: 'G-39Y0P23F1G',
anonymizeIP: false,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
/* Note that markdown documents outside of the docs tree are not processed for frontmatter metadata
Additionally, metadata is only applied in full client builds of the site */
metadata: [
{ name: 'keywords', content: 'deepfence,documentation,howto,threatmapper,threatstryker,secretscanner,packetstreamer,flowmeter,yarahunter,ebpfguard,security,secops,devsecops,appsec' },
{ property: 'og:keywords', content: 'deepfence,documentation,howto,threatmapper,threatstryker,secretscanner,packetstreamer,flowmeter,yarahunter,ebpfguard,security,secops,devsecops,appsec' },
{ name: 'image', content: '/img/social/deepfence.jpg' },
{ property: 'og:image', content: '/img/social/deepfence.jpg' }
],
announcementBar: {
id: 'support_threatmapper',
content:
'Show your love for ThreatMapper, the open-source CNAPP, by <a href="https://github.com/deepfence/ThreatMapper" target="_blank">giving it a star on GitHub</a>',
isCloseable: false
},
navbar: {
hideOnScroll: false,
title: '',
logo: {
alt: 'Deepfence',
href: '/',
src: '/img/deepfence-logo-black.svg',
srcDark: '/img/deepfence-logo-white.svg',
},
items: [
{
to: '/',
label: 'Community',
},
{
to: 'https://deepfence.io/threatstryker',
label: 'Enterprise',
},
{
type: 'dropdown',
label: 'Docs',
position: 'left',
items: [
{
type: 'html',
value: '<div class="nav-dropdown-title">Open Source</div>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/threatmapper/docs">ThreatMapper</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/docs/secretscanner">SecretScanner</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/docs/yarahunter">YaraHunter</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/docs/packetstreamer">PacketStreamer</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/docs/ebpfguard">eBPFGuard</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/docs/flowmeter">FlowMeter</a>',
},
{
type: 'html',
value: '<div class="nav-dropdown-title">Enterprise</div>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/threatstryker/docs">ThreatStryker</a>',
},
{
type: 'html',
value: '<a class="dropdown__link" href="/threatstryker/docs/cloud">Deepfence Cloud</a>',
},
],
},
{
type: 'localeDropdown',
position: 'left',
},
{
href: 'https://deepfence.io',
position: 'right',
className: 'header-deepfence-link',
'aria-label': 'deepfence.io',
},
{
href: 'https://github.com/deepfence',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'GitHub',
items: [
{
label: 'ThreatMapper',
href: 'https://github.com/deepfence/ThreatMapper',
},
{
label: 'SecretScanner',
href: 'https://github.com/deepfence/SecretScanner',
},
{
label: 'YaraHunter',
href: 'https://github.com/deepfence/YaraHunter',
},
{
label: 'PacketStreamer',
href: 'https://github.com/deepfence/PacketStreamer',
},
{
label: 'eBPFGuard',
href: 'https://github.com/deepfence/ebpfguard',
},
{
label: 'FlowMeter',
href: 'https://github.com/deepfence/FlowMeter',
},
],
},
{
title: 'Docs',
items: [
{
html: '<a class="footer__link-item" href="/threatmapper/docs">ThreatMapper</a>',
},
{
html: '<a class="footer__link-item" href="/docs/secretscanner">SecretScanner</a>',
},
{
html: '<a class="footer__link-item" href="/docs/yarahunter">YaraHunter</a>',
},
{
html: '<a class="footer__link-item" href="/docs/packetstreamer">PacketStreamer</a>',
},
{
html: '<a class="footer__link-item" href="/docs/ebpfguard">eBPFGuard</a>',
},
{
html: '<a class="footer__link-item" href="/docs/flowmeter">FlowMeter</a>',
},
],
},
{
title: 'Community',
items: [
{
label: 'Slack',
href: 'https://bitly.com/threatmapper-slack',
},
{
label: 'Twitter',
href: 'https://twitter.com/deepfence',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/channel/UCklvbuOjnzpmtXy-g97tfWQ',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/deepfence-inc',
},
],
},
{
title: 'Enterprise',
items: [
{
label: 'ThreatStryker',
href: 'https://deepfence.io/threatstryker',
},
{
html: '<a class="footer__link-item" href="/threatstryker/docs">ThreatStryker</a>',
},
{
label: 'Deepfence Cloud',
href: 'https://deepfence.cloud',
},
{
html: '<a class="footer__link-item" href="/threatstryker/docs/cloud">Deepfence Cloud Docs</a>',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
href: 'https://deepfence.io/blog',
},
{
label: 'GitHub',
href: 'https://github.com/deepfence',
},
],
},
],
logo: {
alt: 'Deepfence, Inc',
src: '/img/deepfence-logo-white.svg',
width: 160,
height: 51,
},
copyright: `Copyright © ${new Date().getFullYear()} Deepfence, Inc. Built with Docusaurus.`,
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
plugins: [
['./df-bigpicture-plugin', {
trackingID: '1523'
}],
],
};
module.exports = config;