Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

upgrade docusaurus to 3 #1

Merged
merged 4 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {themes} = require('prism-react-renderer');
const lightTheme = themes.github;
const darkTheme = themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -85,8 +86,8 @@ const config = {
copyright: `Copyright © 2021 沈栋`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: lightTheme,
darkTheme: darkTheme,
},
}),
scripts: [
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
"lint-md": "yarn markdownlint --config .github/linters/.markdown-lint.yml **/*.md ./*.md"
},
"dependencies": {
"@docusaurus/core": "2.0.1",
"@docusaurus/preset-classic": "2.0.1",
"@easyops-cn/docusaurus-search-local": "^0.31.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@docusaurus/core": "3.3.2",
"@docusaurus/preset-classic": "3.3.2",
"@easyops-cn/docusaurus-search-local": "^0.40.1",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.1",
"@tsconfig/docusaurus": "^1.0.5",
"markdownlint-cli": "^0.32.1",
"typescript": "^4.7.4"
"@docusaurus/module-type-aliases": "3.3.2",
"@docusaurus/tsconfig": "^3.3.2",
"markdownlint-cli": "^0.40.0",
"typescript": "^5.4.5"
},
"browserslist": {
"production": [
Expand All @@ -44,7 +44,7 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"license": "MIT"
}
6 changes: 0 additions & 6 deletions src/pages/roulette.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
Expand Down
Loading
Loading