Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby build should throw error when someone add the content more than 4 levels of nested folder. #130

Open
mildronize opened this issue Aug 17, 2021 · 0 comments

Comments

@mildronize
Copy link
Collaborator

Problem

When someone add the content more than 4 levels of nested folder, it will not be shown in the any result.

As you can see in the code: /src/components/Sidebar/contentTree.js

// ...
// Maximum Deep level of render Nav menu (Start with 0)
const limitDeepLevel = 3;

// ...

const getDeepNavigation = (navItemGroup, navLinkGroup, pathname, deepLevel) => {
    if(deepLevel > limitDeepLevel){ 
      return [];
    }
    // ...
}

Expected Behavior

When Gatsby build, it should throw some error if someone try to break such prohibition.

4 levels of nested folder.

The below image shows 4 levels of nested folder.

image

this folder structure will create the nested navbar like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant