Skip to content

Commit

Permalink
Document docs/blog themeConfig options
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jun 28, 2024
1 parent eefd798 commit 3744bc5
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions website/docs/api/themes/theme-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,74 @@ export default {
};
```

## Plugins

Our [main themes](./overview.mdx) offer additional theme configuration options for Docusaurus core content plugins.

### Docs

```mdx-code-block
<APITable name="navbar-overview">
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `versionPersistence` | `'localStorage' \| 'none'` | `undefined` | Defines the browser persistence of the preferred docs version. |
| `sidebar.hideable` | `boolean` | `false` | Show a hide button at the bottom of the sidebar. |
| `sidebar.autoCollapseCategories` | `boolean` | `false` | Automatically collapse all sibling categories of the one you navigate to. |

```mdx-code-block
</APITable>
```

Example configuration:

```js title="docusaurus.config.js"
export default {
themeConfig: {
docs: {
// highlight-start
versionPersistence: 'localStorage',
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
// highlight-end
},
},
};
```

### Blog

```mdx-code-block
<APITable name="navbar-overview">
```

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `sidebar.groupByYear` | `boolean` | `true` | Group sidebar blog posts by years. |

```mdx-code-block
</APITable>
```

Example configuration:

```js title="docusaurus.config.js"
export default {
themeConfig: {
blog: {
// highlight-start
sidebar: {
groupByYear: true,
},
// highlight-end
},
},
};
```

## Navbar {#navbar}

Accepted fields:
Expand Down

0 comments on commit 3744bc5

Please sign in to comment.