Update docs/configure/sidebar-and-urls.md

Co-authored-by: Yann Braga <yannbf@gmail.com>
This commit is contained in:
jonniebigodes 2022-05-13 15:48:33 +01:00 committed by GitHub
parent 1ef57ecc59
commit 369e6a25b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ If you need, you can revert to the previous pattern by adding the following conf
### Auto-title redundant filenames
In addition to improvements to the story file name casing, a new heuristic was introduced, removing the filename if it matches an existing directory name or an `index.stories.js|ts` file. For example, `components/MyComponent/MyComponent.stories.js` is defined as `MyComponent/MyComponent` in the sidebar.
In addition to improvements to the story file name casing, a new heuristic was introduced, removing redundant names in case the filename has the same name as the directory name, or if it's called `index.stories.js|ts`. For example, before `components/MyComponent/MyComponent.stories.js` was defined as `Components/MyComponent/MyComponent` in the sidebar. Now it will be defined as `Components/MyComponent`.
If you need to preserve the naming scheme, you can add the `title` element to the default export. For example: