跳到主要内容

📦 theme-classic

这是 Docusaurus 的经典主题。

你可以参考 主题配置 章节获取有关配置的更多详细信息。

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

如果您已经安装了 @docusaurus/preset-classic,则不需要再作为依赖项安装本主题了。

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.

If you use a preset, configure this plugin through the preset options:

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