mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 20:46:58 +02:00
docs: mention config/sidebars run in Node.js runtime (#10608)
This commit is contained in:
parent
1a2b8b7d05
commit
35aa39bddb
7 changed files with 22 additions and 8 deletions
|
@ -12,8 +12,8 @@ Creating a sidebar is useful to:
|
|||
|
||||
To use sidebars on your Docusaurus site:
|
||||
|
||||
1. Define a file that exports a dictionary of [sidebar objects](#sidebar-object).
|
||||
2. Pass this object into the `@docusaurus/plugin-docs` plugin directly or via `@docusaurus/preset-classic`.
|
||||
1. Define a sidebars file that exports a dictionary of [sidebar objects](#sidebar-object).
|
||||
2. Pass its path to the `@docusaurus/plugin-docs` plugin directly or via `@docusaurus/preset-classic`.
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
|
@ -31,6 +31,12 @@ export default {
|
|||
};
|
||||
```
|
||||
|
||||
:::important Node.js runtime
|
||||
|
||||
The sidebars file is run with Node.js. You can't use or import browsers APIs, React or JSX in it.
|
||||
|
||||
:::
|
||||
|
||||
This section serves as an overview of miscellaneous features of the doc sidebar. In the following sections, we will more systematically introduce the following concepts:
|
||||
|
||||
```mdx-code-block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue