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

Setting InclusionLevel.NOT_IN_NAV still adds pages to nav #3336

Closed
squidfunk opened this issue Aug 14, 2023 · 0 comments · Fixed by #3443
Closed

Setting InclusionLevel.NOT_IN_NAV still adds pages to nav #3336

squidfunk opened this issue Aug 14, 2023 · 0 comments · Fixed by #3443
Milestone

Comments

@squidfunk
Copy link
Sponsor Contributor

squidfunk commented Aug 14, 2023

As discussed on Gitter, we should consider excluding pages from auto-populated navigation if they are tagged as NOT_IN_NAV within a plugin as part of on_files. Currently, only pages tagged with EXCLUDED are not considered. The solution that @oprypin suggested was to simply change:

documentation_pages = files.documentation_pages()

... to:

documentation_pages = files.documentation_pages(inclusion = InclusionLevel.is_in_nav)

Current workaround:

  1. Set pages that should not be auto-populated to InclusionLevel.EXCLUDED in on_files
  2. Set pages that were previously excluded to InclusionLevel.NOT_IN_NAV in on_nav (after population)
@oprypin oprypin added this to the 1.6.0 milestone Aug 25, 2023
oprypin added a commit that referenced this issue Oct 28, 2023
to decide whether a file in included when generating the implicit nav.

Fixes #3336
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

Successfully merging a pull request may close this issue.

2 participants