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

With navigation.indexes, nav doesn't recognise dirs with no other pages #3071

Closed
5 tasks done
jaklan opened this issue Oct 2, 2021 · 2 comments
Closed
5 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@jaklan
Copy link

jaklan commented Oct 2, 2021

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Let's say we have a following structure: docs/projects/project-name/docs. In docs folder we only have an index.md file. If we enable navigation.indexes it works as expected, but we still see an arrow on the right side, which indicates there are some pages within given section, which is not true - it's just empty.

Expected behaviour

The expected behaviour is already implemented in the mkdocs-section-index plugin - in such scenario there's no arrow on the right side.
image

Actual behaviour

image

Steps to reproduce

  1. Create docs/projects/project-name/docs dirs.
  2. Create only index.md file in the last dir.
  3. Enable navigation.indexes.
  4. Run mkdocs serve.

Package versions

  • Python: 3.8.12
  • MkDocs: 1.2.2
  • Material: 7.3.1

Configuration

site_name: Whatever

theme:
  name: material
  features:
    - navigation.tabs
    - navigation.top
    - navigation.indexes

System information

  • Operating system: macOS
  • Browser: Chrome
@squidfunk
Copy link
Owner

Thanks for reporting 😊 Fixed in 149b0db.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Oct 2, 2021
@jaklan
Copy link
Author

jaklan commented Oct 2, 2021

That was fast 😄 Thanks!

@jaklan jaklan closed this as completed Oct 2, 2021
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

2 participants