跳到主要内容
版本:2.4.1

📦 theme-classic

The classic theme for Docusaurus.

You can refer to the theme configuration page for more details on the configuration.

npm install --save @docusaurus/theme-classic
提示

If you have installed @docusaurus/preset-classic, you don't need to install it as a dependency.

Configuration

Accepted fields:

OptionTypeDefaultDescription
customCssstring[] | string[]Stylesheets to be imported globally as client modules. Relative paths are resolved against the site directory.
备注

Most configuration for the theme is done in themeConfig, which can be found in theme configuration.

Example configuration

You can configure this theme through preset options or plugin options.

提示

Most Docusaurus users configure this plugin through the preset options.

如果使用预设,请通过预设选项配置此插件:

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};