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

Hide breadcrumb only for parent element #3754

Open
nikischin opened this issue Nov 30, 2024 · 2 comments
Open

Hide breadcrumb only for parent element #3754

nikischin opened this issue Nov 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@nikischin
Copy link
Contributor

Describe the bug
If the parent breadcrumb is disabled, it cannot be enabled for the children. This should not be the case as I might want to disable the breadcrumb for the root article but not it's children

To Reproduce Steps to reproduce the behavior:

_meta.ts (parent dir)

export default {
  parent: {
    theme: {
      breadcrumb: false
    }
  }
}

_meta.ts (child dir)

export default {
  child: {
    theme: {
      breadcrumb: true
    }
  }
}

Expected behavior

I would expect the theme options of the parent not to be inherited by the children. If this is by design, I would at least expect them to be overwritten by the child config.

Desktop (please complete the following information):

  • OS: macOS
  • Browser Safari
  • Version 18.1.1
@nikischin nikischin added the bug Something isn't working label Nov 30, 2024
@nikischin
Copy link
Contributor Author

Possible duplicate of #2892 though 2892 doesn't state this is a bug and just indicated missing docs. The solution provided in 2892 does not work for me.

@dimaMachina
Copy link
Collaborator

Hi, please create a failing test https://github.com/shuding/nextra/blob/main/packages/nextra/__test__/normalize-page.spec.ts

I tested in v4 and was able to override theme.breadcrumb in child route
image

Note

In screenshot there is an example of a single root meta file _meta.global https://github.com/shuding/nextra/blob/v4-v2/docs/app/_meta.global.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants