Skip to content

Setting InclusionLevel.NOT_IN_NAV still adds pages to nav #3336

@squidfunk

Description

@squidfunk

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions