In the Docs page of any collection of stories, before the stories are listed, there is some kind of summary composed of a title, optionally a description of the collection and a duplicate of the first story shown with controls.
I don't see the point of showing this duplicate, especially given it's just one of many variants and does not summarise anything.
Can storybook be configured not to add this section? I don't mind seeing the title of the collection and the description.
Thanks.
This is officially supported.
You simply need to omit DocBlock.Primary
and DocBlock.Controls
from the default parameters.docs.page
setting.
First create your own page layout if you don't have one:
import * as DocBlock from '@storybook/blocks';
const page = () => (
<>
<DocBlock.Title />
<DocBlock.Description />
<DocBlock.Stories />
</>
);
And reference it in your default export within .storybook/preview.tsx
or any of your *.stories.tsx
:
const preview /* or meta */ = {
parameters: {
docs: { page }
}
}