Skip to content

Commit 8f98b25

Browse files
josh-wongjnmt
andauthored
Upgrade Docusaurus from 3.7.0 to 3.9.2 (#1011)
* Upgrade Docusaurus from 3.7.0 to 3.9.1 * Move `onBrokenMarkdownLinks` to markdown hooks The onBrokenMarkdownLinks option was removed from the root config and added under markdown.hooks to align with updated Docusaurus configuration structure. This change complies with a change made in Docusaurus 3.9: facebook/docusaurus#11283 * Add `onDuplicateRoutes` configuration * Change version number in description * Update Node.js version to `20` Bump Node.js version from `18` to `20` in deploy and test-deploy GitHub Actions workflows to ensure compatibility with the latest Node.js features and security updates. This is necessary because Docusaurus 3.9 drops support for Node.js 18: https://docusaurus.io/blog/releases/3.9#dropping-nodejs-18 * Ensure output directory exists before writing JSON Added logic to create the output directory if it does not exist before writing the glossary JSON file. This prevents errors when the specified output path's directory is missing. * Add `key` attributes for labels with duplicate names When labels have duplicate names, the sidebar must contain a `key` attribute. Without these `key` attributes, Docusaurus 3.9 (and likely later unless this specification changes) will encounter errors during the build process. As described in the Docusaurus blog post for 3.9: "In #11228, we added a new `key` attribute to the docs sidebar items, allowing to assign explicit translation keys to each sidebar item that use the same label and would otherwise lead to translation key conflicts." Related Docusaurus PR: facebook/docusaurus#11228 * Add `colorMode` to respect user's light/dark theme preference Introduced a colorMode section in the Docusaurus config to set the default mode to light, enable the color mode switch, and respect the user's preferred color scheme. * Change `current` to version number (`3.12`) * Change format of `key` values Addresses: #1011 (comment) Co-Authored-By: Jun Nemoto <[email protected]> * Upgrade Docusaurus form 3.9.1 to 3.9.2 --------- Co-authored-by: Jun Nemoto <[email protected]>
1 parent 85a01c2 commit 8f98b25

17 files changed

+1774
-999
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fetch-depth: 0
1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 18
21+
node-version: 20
2222
cache: npm
2323
- name: Install Python dependencies
2424
run: |

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fetch-depth: 0
1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 18
21+
node-version: 20
2222
cache: npm
2323

2424
- name: Install dependencies

docusaurus.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const config = {
2424
projectName: 'docs-scalardl', // Usually your repo name.
2525

2626
onBrokenLinks: 'warn',
27-
onBrokenMarkdownLinks: 'ignore',
2827
onBrokenAnchors: 'ignore',
28+
onDuplicateRoutes: 'warn',
2929

3030
// Even if you don't use internationalization, you can use this field to set
3131
// useful metadata like html lang. For example, if your site is Chinese, you
@@ -283,6 +283,9 @@ const config = {
283283
],
284284
markdown: {
285285
mermaid: true,
286+
hooks: {
287+
onBrokenMarkdownLinks: 'ignore',
288+
},
286289
},
287290
themes: ['@docusaurus/theme-mermaid'],
288291

@@ -472,6 +475,11 @@ const config = {
472475
textColor: '#FFFFFF',
473476
isCloseable: false,
474477
},
478+
colorMode: {
479+
defaultMode: 'light',
480+
disableSwitch: false,
481+
respectPrefersColorScheme: true,
482+
},
475483
zoom: {
476484
selector: '.markdown :not(em) > img:not(.youtube-embed img)',
477485
background: {

i18n/versioned_docs/ja-jp/docusaurus-plugin-content-docs/version-3.10.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version.label": {
33
"message": "3.10",
4-
"description": "The label for version current"
4+
"description": "The label for version 3.10"
55
},
66
"sidebar.docs.category.About ScalarDL": {
77
"message": "ScalarDL について",

i18n/versioned_docs/ja-jp/docusaurus-plugin-content-docs/version-3.11.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version.label": {
33
"message": "3.11",
4-
"description": "The label for version current"
4+
"description": "The label for version 3.11"
55
},
66
"sidebar.docs.category.About ScalarDL": {
77
"message": "ScalarDL について",

0 commit comments

Comments
 (0)