Skip to content

Commit 0016c13

Browse files
committed
Bump docusaurus to v3.9 latest
Signed-off-by: Martin Dekov <martin.dekov@suse.com>
1 parent f3c3aa4 commit 0016c13

File tree

12 files changed

+6310
-4253
lines changed

12 files changed

+6310
-4253
lines changed

.github/workflows/pull-request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Pull Request Preview
22

33
on:
4-
pull_request_target:
4+
pull_request:
55

66
concurrency:
77
group: ${{ github.workflow }}-${{ github.event.number }}
@@ -17,10 +17,10 @@ jobs:
1717
with:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919

20-
- name: Set up Node.js 18
20+
- name: Set up Node.js 20
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 18
23+
node-version: 20
2424

2525
- name: Install dependencies
2626
run: |
@@ -43,10 +43,10 @@ jobs:
4343
pull-requests: write
4444
needs: prepare
4545
steps:
46-
- name: Set up Node.js 18
46+
- name: Set up Node.js 20
4747
uses: actions/setup-node@v4
4848
with:
49-
node-version: 18
49+
node-version: 20
5050

5151
- name: Install dependencies
5252
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717

18-
- name: Set up Node.js 18
18+
- name: Set up Node.js 20
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 18
21+
node-version: 20
2222

2323
- name: Install dependencies
2424
run: |

docs/troubleshooting/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against
148148

149149
:::note
150150

151-
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
151+
You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
152152

153153
:::
154154

docusaurus.config.js

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github');
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
4+
const {themes} = require('prism-react-renderer');
5+
const lightCodeTheme = themes.github;
6+
const darkCodeTheme = themes.dracula;
67

78
/** @type {import('@docusaurus/types').DocusaurusConfig} */
89
const config = {
@@ -11,7 +12,11 @@ const config = {
1112
url: "https://docs.harvesterhci.io",
1213
baseUrl: "/",
1314
onBrokenLinks: "warn",
14-
onBrokenMarkdownLinks: "warn",
15+
markdown: {
16+
hooks: {
17+
onBrokenMarkdownLinks: "warn",
18+
},
19+
},
1520
favicon: "img/favicon.ico",
1621
organizationName: "harvester",
1722
projectName: "docs",
@@ -27,27 +32,16 @@ const config = {
2732
},
2833
},
2934
},
30-
webpack: {
31-
jsLoader: (isServer) => ({
32-
loader: require.resolve("swc-loader"),
33-
options: {
34-
jsc: {
35-
parser: {
36-
syntax: "typescript",
37-
tsx: true,
38-
},
39-
target: "es2019",
40-
transform: {
41-
react: {
42-
runtime: "automatic",
43-
},
44-
},
45-
},
46-
module: {
47-
type: isServer ? "commonjs" : "es6",
48-
},
49-
},
50-
}),
35+
future: {
36+
v4: true,
37+
experimental_faster: {
38+
swcJsLoader: true,
39+
swcJsMinimizer: true,
40+
swcHtmlMinimizer: true,
41+
lightningCssMinimizer: true,
42+
rspackBundler: true,
43+
mdxCrossCompilerCache: true,
44+
},
5145
},
5246
themes: ["docusaurus-theme-openapi-docs"],
5347
presets: [

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,21 @@
2020
"gen-pdf-docs": "docs-to-pdf docusaurus --initialDocURLs='http://localhost:3000' --contentSelector='article' --paginationSelector='a.pagination-nav__link.pagination-nav__link--next' --excludeSelectors='.margin-vert--xl a,[class^='tocCollapsible'],.breadcrumbs,.theme-edit-this-page' --excludePaths='/v1.3/api/' --protocolTimeout=360000 --outputPDFFilename=harvester.pdf"
2121
},
2222
"dependencies": {
23-
"@docusaurus/core": "^2.4.0",
24-
"@docusaurus/plugin-client-redirects": "^2.4.0",
25-
"@docusaurus/plugin-content-blog": "^2.4.0",
26-
"@docusaurus/plugin-content-docs": "^2.4.0",
27-
"@docusaurus/plugin-content-pages": "^2.4.0",
28-
"@docusaurus/plugin-debug": "^2.4.0",
29-
"@docusaurus/preset-classic": "^2.4.0",
30-
"@mdx-js/react": "^1.6.22",
23+
"@docusaurus/core": "^3.9.0",
24+
"@docusaurus/faster": "^3.9.2",
25+
"@docusaurus/plugin-client-redirects": "^3.9.0",
26+
"@docusaurus/plugin-content-blog": "^3.9.0",
27+
"@docusaurus/plugin-content-docs": "^3.9.0",
28+
"@docusaurus/plugin-content-pages": "^3.9.0",
29+
"@docusaurus/plugin-debug": "^3.9.0",
30+
"@docusaurus/preset-classic": "^3.9.0",
31+
"@mdx-js/react": "^3.0.0",
3132
"clsx": "^1.1.1",
3233
"docs-to-pdf": "^0.6.2",
33-
"docusaurus-plugin-image-zoom": "^1.0.0",
34-
"docusaurus-plugin-openapi-docs": "^2.1.2",
35-
"docusaurus-theme-openapi-docs": "^2.1.2",
36-
"prism-react-renderer": "^1.3.1",
34+
"docusaurus-plugin-image-zoom": "^3.0.1",
35+
"docusaurus-plugin-openapi-docs": "^4.5.1",
36+
"docusaurus-theme-openapi-docs": "^4.5.1",
37+
"prism-react-renderer": "^2.4.0",
3738
"react": "^18.2.0",
3839
"react-dom": "^18.2.0",
3940
"remark-cli": "^11.0.0",

sidebars.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
// @ts-check
1313

14+
const apiSidebar = require("./docs/api/sidebar.ts");
15+
1416
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
1517
const sidebars = {
1618
docs: [{ type: 'autogenerated', dirName: '.' }],
@@ -24,7 +26,7 @@ const sidebars = {
2426
description:
2527
"This is the API doc of the Harvester server. The APIs are broken down into the categories below:",
2628
},
27-
items: require("./docs/api/sidebar.js"),
29+
items: apiSidebar.default || apiSidebar,
2830
},
2931
],
3032
};

src/theme/DocVersionBanner/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import Translate from '@docusaurus/Translate';
77
import {
88
useActivePlugin,
99
useDocVersionSuggestions,
10+
useDocsVersion,
11+
useDocsPreferredVersion,
1012
} from '@docusaurus/plugin-content-docs/client';
1113
import {ThemeClassNames} from '@docusaurus/theme-common';
12-
import {
13-
useDocsPreferredVersion,
14-
useDocsVersion,
15-
} from '@docusaurus/theme-common/internal';
1614
function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
1715
return (
1816
<Translate

versioned_docs/version-v1.4/troubleshooting/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against
148148

149149
:::note
150150

151-
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
151+
You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
152152

153153
:::
154154

versioned_docs/version-v1.5/troubleshooting/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ After you obtain a copy of the kubeconfig file, run the following script against
146146

147147
:::note
148148

149-
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
149+
You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
150150

151151
:::
152152

versioned_docs/version-v1.6/troubleshooting/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against
148148

149149
:::note
150150

151-
You must replace <VIP\> with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
151+
You must replace `<VIP>` with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link.
152152

153153
:::
154154

0 commit comments

Comments
 (0)