Co-authored-by: Oleksii Kadurin <ovkadurin@gmail.com>; Thijs Louisse <Thijs.Louisse@ing.com>
10 lines
388 B
JavaScript
10 lines
388 B
JavaScript
export const maxDepthForNonComponentsNavigation = 2;
|
|
export const docsDirName = '/docs/';
|
|
export const isToBeConcatenated = (path) => {
|
|
if (path.includes('/components/')) {
|
|
return true;
|
|
}
|
|
const pathAfterDocs = path.split(docsDirName)[1];
|
|
const numberOfSections = pathAfterDocs.split('/').length;
|
|
return numberOfSections > maxDepthForNonComponentsNavigation;
|
|
}
|