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: - path in front matter does not hide the navigation path #6705

Closed
4 tasks done
Valerie-ts opened this issue Jan 28, 2024 · 3 comments
Closed
4 tasks done

hide: - path in front matter does not hide the navigation path #6705

Valerie-ts opened this issue Jan 28, 2024 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Valerie-ts
Copy link

Context

I use breadcrumbs in my documentation, but want to hide them on the index page of my folders.
The option to hide bradcrumbs on single pages was introduced as part of 9.0.5-insiders-4.28.1, see #4875.

Bug description

The front matter of a file contains hide: - path, but the navigation path is still shown on the page.
image

Related links

Reproduction

9.5.6+insiders.4.52.0-hide-breadcrumbs.zip

Steps to reproduce

  1. Add the following configuration to the mkdocs.yml file:
theme:
  name: material
  features:
     - navigation.path
  1. Create a folder "breadcrumbs" in the /docs directory.
  2. Create a new index.md file in the folder.
  3. Add the following front matter:
---
hide:
  - path
---
  1. Serve the project.

Browser

No response

Before submitting

@alexvoss alexvoss added the needs investigation Issue must be investigated by the maintainers label Jan 28, 2024
@alexvoss
Copy link
Sponsor Collaborator

The hidden attribute on the nav element for the breadcrumbs is set correctly but the browser (tried Firefox and Safari) still displays the breadcrumbs. It seems that hidden is overridden by CSS styling as it merely triggers browser built-in styling? The .md-path class applied to nav has display="block". I'll go out on a limb here and label this a bug.

@alexvoss alexvoss added bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels Jan 28, 2024
@squidfunk
Copy link
Owner

Thanks for reporting and providing the reproduction! Fixed in 1dfc91e.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jan 30, 2024
@squidfunk
Copy link
Owner

Released as part of 9.5.6+insiders-4.52.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants