storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.12k stars 9.25k forks source link

[Documentation]: Add `metaTags` to indexer doc #26732

Open psychobolt opened 6 months ago

psychobolt commented 6 months ago

Describe the problem

In the indexer documentation, there is no reference to the new metaTags introduced in v8.

Additional context

Potential issue: there was ongoing behavior change with story indexing since its experimental. It's not clear what breaks with the new upgrade.

I was wondering why my Docs entry was not being rendered by preview with tags: ['autodocs'] after upgrading. It turns out tags is only meant for a single Story which probably break add-ons that used to rely on only tags to generate the Doc. So in order to generate story docs you have to do this:

return entries.map((entry) => ({
  // ...
  tags: ['autodocs'],
  metaTags: ['autodocs'] // required, or you can't view your docs!
}));
shilman commented 6 months ago

@psychobolt Sorry about the destabilization here. Can you give me a little context for how you're using indexers? I'm working on tags right now (and may end up reverting this change!) so I'd love to know more.

psychobolt commented 6 months ago

You can see the doc on it here. The relevant code is here