-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
243 lines (228 loc) · 6.95 KB
/
docusaurus.config.ts
File metadata and controls
243 lines (228 loc) · 6.95 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
235
236
237
238
239
240
241
242
243
import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes as prismThemes } from "prism-react-renderer";
import remarkTokenReplacer from "./src/plugins/replace-tokens";
import latestVersions from "./src/plugins/latest-versions";
const description = "Large-scale automated source code refactoring"
const structuredData = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'OpenRewrite',
operatingSystem: 'Windows, macOS, Linux',
applicationCategory: 'ProductivityApplication',
description,
author: {
'@type': 'Organization',
name: 'Moderne',
},
datePublished: new Date(),
softwareVersion: latestVersions["{{VERSION_ORG_OPENREWRITE_REWRITE_CORE}}"],
downloadUrl: 'https://github.com/openrewrite/rewrite/releases',
video: {
'@type': 'VideoObject',
name: "Migrate to Java 21 using OpenRewrite",
description: "This recipe will apply changes commonly needed when migrating to Java 21. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 21 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 21.",
thumbnailUrl: "https://i.ytimg.com/vi/uViRlX-RahA/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLCBmYPSz3dMNEQR7pseLWsVszXd2A",
uploadDate: new Date("Feb 13, 2024 "),
contentUrl: "https://www.youtube.com/watch?v=uViRlX-RahA",
embedUrl: "https://www.youtube.com/embed/uViRlX-RahA?si=v1T7sLsQJ4YQdWPo",
},
};
const config: Config = {
title: "OpenRewrite Docs",
headTags: [
{
tagName: 'script',
attributes: {
type: 'application/ld+json',
},
innerHTML: JSON.stringify(structuredData),
},
// <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',
},
},
],
tagline: description,
favicon: "img/favicon.ico",
url: "https://docs.openrewrite.org",
baseUrl: "/",
organizationName: "openrewrite",
projectName: "rewrite-docs",
deploymentBranch: "docusaurus",
trailingSlash: false,
onBrokenLinks: process.env.CI_STRICT_LINKS ? 'throw' : 'warn',
i18n: {
defaultLocale: "en",
locales: ["en"],
},
scripts: [
{
src: 'reo.js',
}
],
presets: [
[
"classic",
{
docs: {
routeBasePath: "/",
exclude: ['**/_*.{js,jsx,ts,tsx,md,mdx}'],
sidebarCollapsible: true,
sidebarPath: "./sidebars.ts",
editUrl: "https://github.com/openrewrite/rewrite-docs/edit/master",
remarkPlugins: [
[
remarkTokenReplacer,
{
replacements: latestVersions,
},
],
],
},
gtag: {
trackingID: "G-Y67JVX3WB7",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],
markdown: {
hooks: {
onBrokenMarkdownLinks: process.env.CI_STRICT_LINKS ? 'throw' : 'warn',
onBrokenMarkdownImages: process.env.CI_STRICT_LINKS ? 'throw' : 'warn',
}
},
plugins: [
[
'docusaurus-plugin-llms',
{
generateLLMsTxt: true,
generateLLMsFullTxt: false,
generateMarkdownFiles: true,
docsDir: 'docs',
title: 'OpenRewrite Documentation',
description: 'Large-scale automated source code refactoring',
excludeImports: true,
removeDuplicateHeadings: true,
customLLMFiles: [
{
filename: 'llms-getting-started.txt',
includePatterns: ['introduction.md', '**/running-recipes/**/*'],
fullContent: false,
title: 'OpenRewrite Getting Started',
description: 'Introduction and guides for running OpenRewrite recipes',
},
{
filename: 'llms-authoring.txt',
includePatterns: ['**/authoring-recipes/**/*'],
fullContent: false,
title: 'OpenRewrite Recipe Development',
description: 'Guides for creating and testing OpenRewrite recipes',
},
{
filename: 'llms-reference.txt',
includePatterns: ['**/reference/**/*', '**/concepts-and-explanations/**/*'],
fullContent: false,
title: 'OpenRewrite Reference & Concepts',
description: 'Technical reference documentation and core concepts',
},
],
},
],
],
future: {
experimental_faster: true,
v4: true,
},
themeConfig: {
algolia: {
appId: "8XDBE5G3ZV",
apiKey: "14363fc8de10ed3d1785fe6d17a92631",
indexName: "openrewrite",
},
announcementBar: {
id: "moderne_recipe_catalog",
content:
'<strong>Moderne customer?</strong> <a href="https://docs.moderne.io/user-documentation/recipes/recipe-catalog" target="_blank" rel="noopener">Use the Moderne recipe catalog instead.</a>',
isCloseable: true,
},
image: "img/moderne-poster-logo.svg",
colorMode: {
respectPrefersColorScheme: true,
},
metadata: [
{
name: 'keywords',
content: 'auto-remediation, Java, migrate, Moderne, OpenRewrite, refactoring, SAST, SCA, Spring Boot Migration, security'
},
],
navbar: {
logo: {
alt: "OpenRewrite Logo",
src: "img/logo.svg",
srcDark: "img/darkLogo.svg",
},
items: [
{
href: "https://github.com/openrewrite",
label: "GitHub",
position: "right",
},
{
href: "https://join.slack.com/t/rewriteoss/shared_invite/zt-nj42n3ea-b~62rIHzb3Vo0E1APKCXEA",
label: "Slack",
position: "right",
},
{
href: "https://discord.gg/xk3ZKrhWAb",
label: "Discord",
position: "right",
},
{
href: "https://docs.moderne.io",
label: "Moderne docs",
position: "right",
},
],
},
footer: {
copyright: `© Moderne, ${new Date().getFullYear()}`,
},
prism: {
theme: prismThemes.vsDark,
darkTheme: prismThemes.vsDark,
additionalLanguages: [
"bash",
"docker",
"groovy",
"java",
"kotlin",
"yaml",
],
},
} satisfies Preset.ThemeConfig,
};
export default config;