Skip to content

Commit c1fafd5

Browse files
committed
fix(config): migrate onBrokenMarkdownLinks to markdown.hooks for Docusaurus v4
1 parent 8dfd7b0 commit c1fafd5

File tree

4 files changed

+1332
-993
lines changed

4 files changed

+1332
-993
lines changed

docusaurus.config.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,29 @@ const config = {
1111
title: "CodeHarborHub",
1212
tagline: "A place to learn and grow",
1313
favicon: "img/favicon_io/favicon.ico",
14-
url: "https://codeharborhub.github.io/",
14+
url: "https://codeharborhub.github.io",
1515
baseUrl: "/tutorial/",
1616
customFields: {
1717
admin: "Ajay Dhangar",
1818
superman: "Shivay",
1919
},
2020

2121
organizationName: "codeharborhub",
22-
projectName: "dsa",
22+
projectName: "tutorial",
2323

2424
onBrokenLinks: "throw",
25-
onBrokenMarkdownLinks: "warn",
25+
26+
// ==== // ❌ Deprecated usage ==============
27+
28+
// onBrokenMarkdownLinks: "warn",
29+
30+
// ===========================================
31+
32+
markdown: {
33+
hooks: {
34+
onBrokenMarkdownLinks: "warn", // ✅ New location
35+
},
36+
},
2637

2738
presets: [
2839
[
@@ -31,17 +42,11 @@ const config = {
3142
({
3243
// debug: true,
3344
docs: {
45+
routeBasePath: "/",
3446
sidebarPath: "./sidebars.js",
3547
editUrl: "https://github.com/codeharborhub/tutorial/edit/main/",
36-
routeBasePath: "/",
3748
remarkPlugins: [remarkMath],
38-
rehypePlugins: [rehypeKatex],
39-
showLastUpdateAuthor: true,
40-
showLastUpdateTime: true,
41-
admonitions: {
42-
keywords: ["my-custom-admonition"],
43-
extendDefaults: true,
44-
},
49+
rehypePlugins: [rehypeKatex],
4550
},
4651
theme: {
4752
customCss: "./src/css/custom.css",

0 commit comments

Comments
 (0)