跳到主要内容
版本:3.5.2

📦 theme-classic

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

接受的字段:

选项类型默认值描述
customCssstring[] | string[]Stylesheets to be imported globally as client modules. 相对文件路径会基于站点目录解析。
备注

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

Example configuration

你可以通过预设选项或插件选项来配置这个主题。

提示

大多数 Docusaurus 用户通过预设选项配置此插件。

如果你使用预设,你可以通过预设选项配置这个插件:

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