-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
234 lines (219 loc) · 6.46 KB
/
docusaurus.config.ts
File metadata and controls
234 lines (219 loc) · 6.46 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
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
import type * as Preset from '@docusaurus/preset-classic';
import type { Config } from '@docusaurus/types';
import { themes as prismThemes } from 'prism-react-renderer';
import latestVersions from "./src/plugins/latest-versions";
import remarkTokenReplacer from "./src/plugins/replace-tokens";
const config: Config = {
title: 'Moderne Docs',
tagline: 'Large-scale automated source code refactoring',
url: 'https://docs.moderne.io',
baseUrl: '/',
organizationName: 'moderneinc',
projectName: 'moderne-docs',
// Only throw on broken links when the full site (including recipe catalog) is built.
onBrokenLinks: (process.env.CI_STRICT_LINKS && !process.env.SKIP_RECIPE_CATALOG) ? 'throw' : 'warn',
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
scripts: [
{
src: 'reo.js',
}
],
clientModules: [
require.resolve('./src/client/gtagGuard.js'),
require.resolve('./src/client/loadNeoDesign.js'),
],
headTags: [
// <link rel="preconnect" href="https://fonts.googleapis.com">
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.googleapis.com',
},
},
// <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
{
tagName: 'link',
attributes: {
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossorigin: 'anonymous',
},
},
{
tagName: 'link',
attributes: {
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
},
},
{
tagName: 'link',
attributes: {
rel: 'icon',
href: '/img/favicon.ico',
type: 'image/x-icon',
sizes: '32x32',
media: '(prefers-color-scheme: light)',
},
},
{
tagName: 'link',
attributes: {
rel: 'icon',
href: '/img/favicon_dark.ico',
type: 'image/x-icon',
sizes: '32x32',
media: '(prefers-color-scheme: dark)',
},
},
],
presets: [
[
'classic',
{
docs: {
routeBasePath: "/",
sidebarCollapsible: true,
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/moderneinc/moderne-docs/edit/main',
// Disabled on Vercel to allow manual preview deployments via `npx vercel`
// (CLI deployments don't include .git directory, breaking git-based timestamps)
showLastUpdateTime: !process.env.VERCEL,
// showLastUpdateAuthor: true,
exclude: [
'**/*.stories.tsx',
'**/*.stories.ts',
'**/*.stories.jsx',
'**/*.stories.js',
// Skip 5,700+ recipe-catalog pages for faster local rebuilds.
// Use `yarn start:fast` to enable this; `yarn start` includes everything.
...(process.env.SKIP_RECIPE_CATALOG ? ['user-documentation/recipes/recipe-catalog/**'] : []),
],
remarkPlugins: [
[
remarkTokenReplacer,
{
replacements: latestVersions,
},
],
],
admonitions: {
keywords: ['summary'],
extendDefaults: true,
},
},
gtag: {
trackingID: "G-Q1CMC219Y5",
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
markdown: {
mermaid: true,
hooks: {
// Only throw on broken markdown links when the full site (including recipe catalog) is built.
// When SKIP_RECIPE_CATALOG is set, recipe list pages will have expected broken links.
onBrokenMarkdownLinks: (process.env.CI_STRICT_LINKS && !process.env.SKIP_RECIPE_CATALOG) ? 'throw' : 'warn',
onBrokenMarkdownImages: process.env.CI_STRICT_LINKS ? 'throw' : 'warn',
}
},
themes: [
'@docusaurus/theme-mermaid',
],
plugins: [
[
'docusaurus-plugin-llms',
{
generateLLMsTxt: true,
generateLLMsFullTxt: false,
generateMarkdownFiles: true,
docsDir: 'docs',
title: 'Moderne Documentation',
description: 'Large-scale automated source code refactoring',
excludeImports: true,
removeDuplicateHeadings: true,
ignoreFiles: ['**/recipe-catalog/**'],
customLLMFiles: [
{
filename: 'llms-platform.txt',
includePatterns: ['**/moderne-platform/**/*'],
fullContent: false,
title: 'Moderne Platform Documentation',
description: 'Enterprise SaaS solution for automated code remediation',
},
{
filename: 'llms-cli.txt',
includePatterns: ['**/moderne-cli/**/*'],
fullContent: false,
title: 'Moderne CLI Documentation',
description: 'Command-line interface for running recipes locally',
},
{
filename: 'llms-dx.txt',
includePatterns: ['**/moderne-dx/**/*'],
fullContent: false,
title: 'Moderne DX Documentation',
description: 'On-premise deployment solution',
},
],
},
],
],
future: {
experimental_faster: true,
v4: true,
},
themeConfig: {
algolia: {
appId: "MEFFK0HGO6",
apiKey: "15eb9c9f6f3147b1cf82b1b7f93cace8",
indexName: "moderne",
// Search filtering is handled by SearchFacetTabs (src/theme/SearchBar)
},
announcementBar: {
id: "code_remix_26",
content: '<strong><a href="https://coderemix.ai/?utm_source=docs&utm_medium=referral&utm_campaign=26_crs_banner">Code Remix Summit is back</a></strong> ✦ May 11–13',
},
colorMode: {
respectPrefersColorScheme: true,
},
image: 'img/moderne-poster-logo.svg',
navbar: {
logo: {
alt: 'Moderne Logo Logo',
src: 'img/logo.svg',
srcDark: 'img/darkLogo.svg',
},
// Navigation handled by MegaMenu in swizzled Navbar/Layout component
},
footer: {
copyright: `© Moderne, ${new Date().getFullYear()}`,
},
prism: {
theme: prismThemes.vsDark,
darkTheme: prismThemes.vsDark,
additionalLanguages: [
"bash",
"docker",
"groovy",
"java",
"kotlin",
"yaml",
"powershell",
"csv",
],
},
sidebar: {
hideable: true,
}
} satisfies Preset.ThemeConfig,
};
export default config;