Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions docs/_snippets/main-config-docs-autodocs.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/_snippets/main-config-typical.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = {
// Optional
addons: ['@storybook/addon-docs'],
docs: {
autodocs: 'tag',
defaultName: 'Documentation',
},
staticDirs: ['../public'],
};
Expand All @@ -25,7 +25,7 @@ const config: StorybookConfig = {
// Optional
addons: ['@storybook/addon-docs'],
docs: {
autodocs: 'tag',
defaultName: 'Documentation',
},
staticDirs: ['../public'],
};
Expand Down
2 changes: 2 additions & 0 deletions docs/_snippets/storybook-auto-docs-full-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
docs: {
//👇 See the table below for the list of supported options
defaultName: 'Documentation',
docsMode: true,
},
};
```
Expand All @@ -22,6 +23,7 @@ const config: StorybookConfig = {
docs: {
//👇 See the table below for the list of supported options
defaultName: 'Documentation',
docsMode: true,
},
};

Expand Down
19 changes: 0 additions & 19 deletions docs/api/main-config/main-config-docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,13 @@ Type:

```ts
{
autodocs?: boolean | 'tag';
defaultName?: string;
docsMode?: boolean;
}
```

Configures Storybook's [auto-generated documentation](../../writing-docs/autodocs.mdx).

## `autodocs`

Type: `boolean | 'tag'`

Default: `'tag'`

Enables or disables automatic documentation for stories.

* `true`: Enables it for all stories
* `false`: Disables it for all stories
* `'tag'`: Enables it for stories tagged with `'autodocs'`

{/* prettier-ignore-start */}

<CodeSnippets path="main-config-docs-autodocs.md" />

{/* prettier-ignore-end */}

## `defaultName`

Type: `string`
Expand Down
2 changes: 1 addition & 1 deletion docs/configure/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Storybook's main configuration (i.e., the `main.js|ts`) defines your Storybook p
| `typescript` | Configures how Storybook handles [TypeScript files](./integration/typescript.mdx) <br /> `typescript: { check: false, checkOptions: {} }` |
| `framework` | Configures Storybook based on a set of [framework-specific](./integration/frameworks.mdx) settings <br /> `framework: { name: '@storybook/svelte-vite', options:{} }` |
| `core` | Configures Storybook's [internal features](../api/main-config/main-config-core.mdx) <br /> `core: { disableTelemetry: true, }` |
| `docs` | Configures Storybook's [auto-generated documentation](../writing-docs/autodocs.mdx)<br /> `docs: { autodocs: 'tag' }` |
| `docs` | Configures Storybook's [auto-generated documentation](../writing-docs/autodocs.mdx)<br /> `docs: { defaultName: 'Documentation' }` |
| `features` | Enables Storybook's [additional features](../api/main-config/main-config-features.mdx)<br /> See table below for a list of available features |
| `refs` | Configures [Storybook composition](../sharing/storybook-composition.mdx) <br /> `refs: { example: { title: 'ExampleStorybook', url:'https://your-url.com' } }` |
| `logLevel` | Configures Storybook's logs in the browser terminal. Useful for debugging <br /> `logLevel: 'debug'` |
Expand Down
8 changes: 5 additions & 3 deletions docs/writing-docs/autodocs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ In addition to enabling the feature with `tags`, you can extend your Storybook c

{/* prettier-ignore-end */}

| Option | Description |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| `defaultName` | Renames the auto-generated documentation page<br /> Default: `docs: { defaultName: 'Documentation' }` |
| Option | Description |
| ---------------------------------------------------------------------| -------------------------------------------------------------------------------------------------------------------------------|
| [`defaultName`](../api/main-config/main-config-docs.mdx#defaultname) | Renames the auto-generated documentation page<br /> Default: `docs: { defaultName: 'Docs' }` |
| [`docsMode`](../api/main-config/main-config-docs.mdx#docsmode) | Toggles the documentation mode, which only shows documentation pages in the sidebar<br /> Default: `docs: { docsMode: false }` |


### Write a custom template

Expand Down
Loading