Skip to content

Commit

Permalink
move/refactor doc
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Feb 16, 2022
1 parent 6ca6697 commit df6ef4c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
2 changes: 2 additions & 0 deletions website/docs/api/plugins/plugin-content-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Accepted fields:
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `path` | `string` | `'docs'` | Path to data on filesystem relative to site dir. |
| `breadcrumbs` | `boolean` | `true` | To enable or disable the breadcrumbs on docs pages. |
| `editUrl` | <code>string \| EditUrlFunction</code> | `undefined` | Base URL to edit your site. The final URL is computed by `editUrl + relativeDocPath`. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. |
| `editLocalizedFiles` | `boolean` | `false` | The edit URL will target the localized file, instead of the original unlocalized file. Ignored when `editUrl` is a function. |
| `editCurrentVersion` | `boolean` | `false` | The edit URL will always target the current version doc instead of older versions. Ignored when `editUrl` is a function. |
Expand Down Expand Up @@ -127,6 +128,7 @@ Most Docusaurus users configure this plugin through the preset options.

const config = {
path: 'docs',
breadcrumbs: true,
// Simple use-case: string editUrl
// editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
// Advanced use-case: functional editUrl
Expand Down
25 changes: 0 additions & 25 deletions website/docs/api/themes/theme-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,31 +159,6 @@ module.exports = {
};
```

### Breadcrumbs {#breadcrumbs}

Breadcrumbs can be rendered on each document page, based on sidebar items.

Accepted fields:

<APITable>

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `breadcrumbs` | <code>boolean \| 'nested'</code> | `nested` | Use boolean value to strictly enable or disable all breadcrumbs, or use `'nested'` when you only want breadcrumbs visible in nested pages. |

</APITable>

Example configuration:

```js title="docusaurus.config.js"
module.exports = {
themeConfig: {
// highlight-next-line
breadcrumbs: 'nested',
},
};
```

## Navbar {#navbar}

Accepted fields:
Expand Down
22 changes: 22 additions & 0 deletions website/docs/guides/docs/sidebar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,28 @@ To pass in custom props to a swizzled sidebar item, add the optional `customProp
};
```

## Sidebar Breadcrumbs {#sidebar-breadcrumbs}

By default, breadcrumbs are rendered at the top, using the "sidebar path" of the current page.

This behavior can be disabled with plugin options:

```js title="docusaurus.config.js"
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
// highlight-next-line
breadcrumbs: false,
},
},
],
],
};
```

## Complex sidebars example {#complex-sidebars-example}

A real-world example from the Docusaurus site:
Expand Down

0 comments on commit df6ef4c

Please sign in to comment.