docs: add h4 into toc on certain pages (#5728)

This commit is contained in:
Joshua Chen 2021-10-20 02:15:11 +08:00 committed by GitHub
parent 43866b4eb3
commit ae3596df39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 11 deletions

View file

@ -2,6 +2,7 @@
id: theme-configuration id: theme-configuration
title: 'Theme configuration' title: 'Theme configuration'
slug: '/api/themes/configuration' slug: '/api/themes/configuration'
toc_max_heading_level: 4
--- ---
This configuration applies to all [main themes](./overview.md). 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. 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). 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. 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. 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. 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. 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. 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. If you use the [search](../../search.md), the search bar will be the rightmost element in the navbar.

View file

@ -1,6 +1,7 @@
--- ---
id: sidebar id: sidebar
title: Sidebar title: Sidebar
toc_max_heading_level: 4
slug: /sidebar slug: /sidebar
--- ---

View file

@ -2,6 +2,7 @@
id: crowdin id: crowdin
title: i18n - Using Crowdin title: i18n - Using Crowdin
slug: /i18n/crowdin slug: /i18n/crowdin
toc_max_heading_level: 4
--- ---
The i18n system of Docusaurus is **decoupled from any translation software**. The i18n system of Docusaurus is **decoupled from any translation software**.

View file

@ -1,6 +1,7 @@
--- ---
id: lifecycle-apis id: lifecycle-apis
title: Lifecycle APIs title: Lifecycle APIs
toc_max_heading_level: 4
--- ---
:::caution :::caution
@ -162,9 +163,9 @@ Plugins should use the data loaded in `loadContent` and construct the pages/rout
### `actions` {#actions} ### `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. Create a route to add to the website.
@ -189,7 +190,7 @@ type Module =
| string; | 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. 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. 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.

View file

@ -2,6 +2,7 @@
id: migration-manual id: migration-manual
title: Manual migration title: Manual migration
slug: /migration/manual 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. 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.