mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 18:58:36 +02:00
docs: add h4 into toc on certain pages (#5728)
This commit is contained in:
parent
43866b4eb3
commit
ae3596df39
5 changed files with 16 additions and 11 deletions
|
@ -2,6 +2,7 @@
|
|||
id: theme-configuration
|
||||
title: 'Theme configuration'
|
||||
slug: '/api/themes/configuration'
|
||||
toc_max_heading_level: 4
|
||||
---
|
||||
|
||||
This configuration applies to all [main themes](./overview.md).
|
||||
|
@ -251,7 +252,7 @@ module.exports = {
|
|||
|
||||
The items can have different behaviors based on the `type` field. The sections below will introduce you to all the types of navbar items available.
|
||||
|
||||
### Navbar link {#navbar-link}
|
||||
#### Navbar link {#navbar-link}
|
||||
|
||||
By default, Navbar items are regular links (internal or external).
|
||||
|
||||
|
@ -306,7 +307,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar dropdown {#navbar-dropdown}
|
||||
#### Navbar dropdown {#navbar-dropdown}
|
||||
|
||||
Navbar items of the type `dropdown` has the additional `items` field, an inner array of navbar items.
|
||||
|
||||
|
@ -362,7 +363,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar doc link {#navbar-doc-link}
|
||||
#### Navbar doc link {#navbar-doc-link}
|
||||
|
||||
If you want to link to a specific doc, this special navbar item type will render the link to the doc of the provided `docId`. It will get the class `navbar__link--active` as long as you browse a doc of the same sidebar.
|
||||
|
||||
|
@ -400,7 +401,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar docs version dropdown {#navbar-docs-version-dropdown}
|
||||
#### Navbar docs version dropdown {#navbar-docs-version-dropdown}
|
||||
|
||||
If you use docs with versioning, this special navbar item type that will render a dropdown with all your site's available versions.
|
||||
|
||||
|
@ -441,7 +442,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar docs version {#navbar-docs-version}
|
||||
#### Navbar docs version {#navbar-docs-version}
|
||||
|
||||
If you use docs with versioning, this special navbar item type will link to the active/browsed version of your doc (depends on the current URL), and fallback to the latest version.
|
||||
|
||||
|
@ -479,7 +480,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar locale dropdown {#navbar-locale-dropdown}
|
||||
#### Navbar locale dropdown {#navbar-locale-dropdown}
|
||||
|
||||
If you use the [i18n feature](../../i18n/i18n-introduction.md), this special navbar item type will render a dropdown with all your site's available locales.
|
||||
|
||||
|
@ -522,7 +523,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Navbar search {#navbar-search}
|
||||
#### Navbar search {#navbar-search}
|
||||
|
||||
If you use the [search](../../search.md), the search bar will be the rightmost element in the navbar.
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
id: sidebar
|
||||
title: Sidebar
|
||||
toc_max_heading_level: 4
|
||||
slug: /sidebar
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
id: crowdin
|
||||
title: i18n - Using Crowdin
|
||||
slug: /i18n/crowdin
|
||||
toc_max_heading_level: 4
|
||||
---
|
||||
|
||||
The i18n system of Docusaurus is **decoupled from any translation software**.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
id: lifecycle-apis
|
||||
title: Lifecycle APIs
|
||||
toc_max_heading_level: 4
|
||||
---
|
||||
|
||||
:::caution
|
||||
|
@ -162,9 +163,9 @@ Plugins should use the data loaded in `loadContent` and construct the pages/rout
|
|||
|
||||
### `actions` {#actions}
|
||||
|
||||
`actions` contain two functions:
|
||||
`actions` contain three functions:
|
||||
|
||||
- `addRoute(config: RouteConfig): void`
|
||||
#### `addRoute(config: RouteConfig): void`
|
||||
|
||||
Create a route to add to the website.
|
||||
|
||||
|
@ -189,7 +190,7 @@ type Module =
|
|||
| string;
|
||||
```
|
||||
|
||||
- `createData(name: string, data: any): Promise<string>`
|
||||
#### `createData(name: string, data: any): Promise<string>`
|
||||
|
||||
A function to help you create static data (generally json or string), that you can provide to your routes as props.
|
||||
|
||||
|
@ -231,7 +232,7 @@ export default function friendsPlugin(context, options) {
|
|||
}
|
||||
```
|
||||
|
||||
- `setGlobalData(data: any): void`
|
||||
#### `setGlobalData(data: any): void`
|
||||
|
||||
This function permits to create some global plugin data, that can be read from any page, including the pages created by other plugins, and your theme layout.
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
id: migration-manual
|
||||
title: Manual migration
|
||||
slug: /migration/manual
|
||||
toc_max_heading_level: 4
|
||||
---
|
||||
|
||||
This manual migration process should be run after the [automated migration process](./migration-automated.md), to complete the missing parts, or debug issues in the migration CLI output.
|
||||
|
|
Loading…
Add table
Reference in a new issue