mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
fix(theme-classic): validate options properly (#7755)
* fix(theme-classic): validate options properly * improve normalization * fix doc
This commit is contained in:
parent
636d47060e
commit
cba8be01a3
5 changed files with 141 additions and 56 deletions
|
@ -18,3 +18,44 @@ npm install --save @docusaurus/theme-classic
|
|||
If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency.
|
||||
|
||||
:::
|
||||
|
||||
## Configuration {#configuration}
|
||||
|
||||
Accepted fields:
|
||||
|
||||
```mdx-code-block
|
||||
<APITable>
|
||||
```
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `customCss` | <code>string[] \| string</code> | `[]` | Stylesheets to be imported globally as [client modules](../../advanced/client.md#client-modules). Relative paths are resolved against the site directory. |
|
||||
|
||||
```mdx-code-block
|
||||
</APITable>
|
||||
```
|
||||
|
||||
:::note
|
||||
|
||||
Most configuration for the theme is done in `themeConfig`, which can be found in [theme configuration](./theme-configuration.md).
|
||||
|
||||
:::
|
||||
|
||||
### Example configuration {#ex-config}
|
||||
|
||||
You can configure this theme through preset options or plugin options.
|
||||
|
||||
:::tip
|
||||
|
||||
Most Docusaurus users configure this plugin through the preset options.
|
||||
|
||||
:::
|
||||
|
||||
```js config-tabs
|
||||
// Preset Options: theme
|
||||
// Plugin Options: @docusaurus/theme-classic
|
||||
|
||||
const config = {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
};
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue