📦 theme-classic
The classic theme for Docusaurus.
You can refer to the theme configuration page for more details on the configuration.
- npm
- Yarn
- pnpm
npm install --save @docusaurus/theme-classic
yarn add @docusaurus/theme-classic
pnpm add @docusaurus/theme-classic
ヒント
If you have installed @docusaurus/preset-classic
, you don't need to install it as a dependency.
設定
Accepted fields:
Option | Type | Default | 説明 |
---|---|---|---|
customCss | string[] | 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: './src/css/custom.css',
},
},
],
],
};
スタンドアロンプラグインを使用している場合は、プラグインに直接オプションを指定します。
docusaurus.config.js
module.exports = {
plugins: [
[
'@docusaurus/theme-classic',
{
customCss: './src/css/custom.css',
},
],
],
};