Skip to content

Nav: current location shown is incorrect when on ./index #2805

@bhj

Description

@bhj

Search terms

Navigation, index, module, current class

Expected Behavior

current class either matches current location's nav item, or is not present

Actual Behavior

When viewing ./index.html, the current class is instead present on the entry for ./modules.html

Steps to reproduce the bug

Hey, thanks for all your work - I'm new to typedoc but it's immensely helpful. I have a pretty simple repo with a README and a single module. Essentially, in the screenshot below I am viewing the README (index) page, but the nav has the current class on the modules page instead.

Screenshot 2024-12-08 at 11 59 28 AM

I think it would be better if the current class were not present in the nav in this case. Navigating to the modules page now shows different content, but the nav's current page indicator has not changed, which is confusing.

{
  "$schema": "https://typedoc.org/schema.json",
  "entryPoints": ["./src/index.ts"],
  "plugin": ["typedoc-plugin-merge-modules"],
  "defaultCategory": "General",
  "categoryOrder": ["General", "*"],
  "disableSources": true,
  "sort": ["kind", "source-order"],
  "visibilityFilters": {},
  "headings": {
      "readme": false,
      "document": true,
  },
}

I did try disabling typedoc-plugin-merge-modules (using 6.1.0) without change.

Environment

  • Typedoc version: 0.27.3
  • TypeScript version: 5.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions