diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 735461da6..85e7c5459 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,5 +1,4 @@ -const lightCodeTheme = require('prism-react-renderer/themes/github'); -const darkCodeTheme = require('prism-react-renderer/themes/dracula'); +const codeThemes = require('prism-react-renderer').themes; const path = require('path'); /** @type {import('@docusaurus/types').Config} */ @@ -138,8 +137,8 @@ module.exports = { copyright: `Copyright © ${new Date().getFullYear()} Woodpecker CI. Built with Docusaurus.`, }, prism: { - theme: lightCodeTheme, - darkTheme: darkCodeTheme, + theme: codeThemes.github, + darkTheme: codeThemes.dracula, }, announcementBar: { id: 'github-star', diff --git a/docs/package.json b/docs/package.json index 887ff0e80..eb9a2186b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -22,7 +22,7 @@ "clsx": "^2.0.0", "esbuild-loader": "^4.0.0", "file-loader": "^6.2.0", - "prism-react-renderer": "^1.3.5", + "prism-react-renderer": "^2.0.0", "react": "^18.0.0", "react-dom": "^18.0.0", "redocusaurus": "^1.6.3", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 4759e7632..be881028d 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -37,8 +37,8 @@ importers: specifier: ^6.2.0 version: 6.2.0(webpack@5.88.2) prism-react-renderer: - specifier: ^1.3.5 - version: 1.3.5(react@18.2.0) + specifier: ^2.0.0 + version: 2.0.6(react@18.2.0) react: specifier: ^18.0.0 version: 18.2.0 @@ -3461,6 +3461,10 @@ packages: /@types/parse5@5.0.3: resolution: {integrity: sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==} + /@types/prismjs@1.26.0: + resolution: {integrity: sha512-ZTaqn/qSqUuAq1YwvOFQfVW1AR/oQJlLSZVustdjwI+GZ8kr0MSHBj0tsXPW1EqHubx50gtBEjbPGsdZwQwCjQ==} + dev: false + /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} @@ -7297,6 +7301,16 @@ packages: dependencies: react: 18.2.0 + /prism-react-renderer@2.0.6(react@18.2.0): + resolution: {integrity: sha512-ERzmAI5UvrcTw5ivfEG20/dYClAsC84eSED5p9X3oKpm0xPV4A5clFK1mp7lPIdKmbLnQYsPTGiOI7WS6gWigw==} + peerDependencies: + react: '>=16.0.0' + dependencies: + '@types/prismjs': 1.26.0 + clsx: 1.2.1 + react: 18.2.0 + dev: false + /prismjs@1.29.0: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'}