📦 theme-classic
Le thème classic pour 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
astuce
If you have installed @docusaurus/preset-classic
, you don't need to install it as a dependency.
Configuration
Champs acceptés :
Option | Type | Par défaut | Description |
---|---|---|---|
customCss | string[] | string | [] | Stylesheets to be imported globally as client modules. Les chemins relatifs sont résolus par rapport au répertoire du site. |
remarque
Most configuration for the theme is done in themeConfig
, which can be found in theme configuration.
Example configuration
Vous pouvez configurer ce thème via les options du preset ou du plugin.
astuce
La plupart des utilisateurs de Docusaurus configurent ce plugin via les options du preset.
- Preset options
- Plugin options
If you use a preset, configure this plugin through the preset options:
docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
theme: {
customCss: './src/css/custom.css',
},
},
],
],
};
If you are using a standalone plugin, provide options directly to the plugin:
docusaurus.config.js
module.exports = {
plugins: [
[
'@docusaurus/theme-classic',
{
customCss: './src/css/custom.css',
},
],
],
};