docusaurus/website/docs/api/themes/theme-classic.md
Joshua Chen cba8be01a3
fix(theme-classic): validate options properly (#7755)
* fix(theme-classic): validate options properly

* improve normalization

* fix doc
2022-07-11 19:24:46 +08:00

1.3 KiB

sidebar_position slug
2 /api/themes/@docusaurus/theme-classic

📦 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

:::tip

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

:::

Configuration

Accepted fields:

<APITable>
Option Type Default Description
customCss string[] | string [] Stylesheets to be imported globally as client modules. Relative paths are resolved against the site directory.
</APITable>

:::note

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.

:::tip

Most Docusaurus users configure this plugin through the preset options.

:::

// Preset Options: theme
// Plugin Options: @docusaurus/theme-classic

const config = {
  customCss: require.resolve('./src/css/custom.css'),
};