Skip to content

Commit

Permalink
chore(docs): upgrade docusaurus to v3.0 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink authored Nov 7, 2023
1 parent 959c6e3 commit e05bd51
Show file tree
Hide file tree
Showing 3 changed files with 10,985 additions and 5,364 deletions.
20 changes: 7 additions & 13 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

let lightCodeTheme = null;
let darkCodeTheme = null;

try {
// prism-react-renderer is a dependency of @docusaurus/theme-common
lightCodeTheme = require('prism-react-renderer/themes/github');
darkCodeTheme = require('prism-react-renderer/themes/dracula');
} catch (err) {}

// const webpack = require('webpack');
const {resolve} = require('path');
const webpack = require('webpack');
const {themes: prismThemes} = require('prism-react-renderer');

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -189,10 +180,13 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} OpenJS Foundation`
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme
theme: prismThemes.github,
darkTheme: prismThemes.dracula
}
})
};

module.exports = config;
module.exports = async function createConfigAsync() {
console.log('cca');
return config;
};
Loading

0 comments on commit e05bd51

Please sign in to comment.