Skip to content

Commit a8d8388

Browse files
authored
chore: update docusaurus config (#362)
* chore: update docusaurus config * fix: updated * chore: replaced @ts-ignore with @ts-expect-error * chore: added comments
1 parent 592b192 commit a8d8388

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docusaurus.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const config = {
2121
url: 'https://fastify.io',
2222
baseUrl: BASE_URL,
2323
onBrokenLinks: 'warn',
24-
onBrokenMarkdownLinks: 'warn',
2524
favicon: 'img/favicon.ico',
2625
// GitHub Pages redirects with a trailing slash, so this configures links to match
2726
trailingSlash: true,
@@ -35,6 +34,12 @@ const config = {
3534
locales: ['en'],
3635
},
3736

37+
markdown: {
38+
hooks: {
39+
onBrokenMarkdownLinks: 'warn',
40+
},
41+
},
42+
3843
// https://docusaurus.io/docs/using-plugins#using-presets
3944
presets: [
4045
[
@@ -215,6 +220,7 @@ const config = {
215220
to: '/organizations',
216221
},
217222
],
223+
// @ts-expect-error provided types doesn't match the real possible configuration
218224
createRedirects(existingPath) {
219225
// Legacy/Retro compatibility:
220226

@@ -225,6 +231,7 @@ const config = {
225231

226232
// Redirect for old /docs/v3.<x>.<y>/ URLs to the latest v3 version
227233
if (existingPath.startsWith('/docs/v3')) {
234+
// @ts-expect-error provided types doesn't match the real possible configuration
228235
return u.manageRedirects({
229236
existingPath,
230237
major: '3',
@@ -236,6 +243,7 @@ const config = {
236243

237244
// Redirect for old /docs/v2.<x>.<y>/ URLs to the latest v2 version
238245
if (existingPath.startsWith('/docs/v2')) {
246+
// @ts-expect-error provided types doesn't match the real possible configuration
239247
return u.manageRedirects({
240248
existingPath,
241249
major: '2',

0 commit comments

Comments
 (0)