Skip to content

Visiting homepage doesn't set homepage link in sidebar to active #1131

Description

@groenroos

Bug Report

Steps to reproduce

  1. Include a link to the homepage (README.md or whatever's defined in the homepage setting) in the sidebar
  2. Visit the docs root.

What is current behaviour

  1. The sidebar link to the homepage does not have the active class to highlight it, and its submenu is not expanded.
  2. If the homepage link is clicked, #/README is appended to the URL, and then the active class is included.
    • The URL fragment is always README, even if the file is called something else.

What is the expected behaviour

  1. The sidebar link to the homepage should have the active class, and the submenu should be expanded.
  2. There should only be one canonical URL for the homepage (preferably one without a fragment in the URL)
    • The fragment should at least match the filename defined in homepage

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS 10.15.4

  • Node.js version: 13.13.0

  • yarn version: 1.22.4

  • Browser version: Chrome 80.0.3987.149

  • Docsify version: 4.11.3

  • Docsify plugins: pagination, copy-code

Please create a reproducible sandbox

Edit angry-hodgkin-3vxu8

Mention the docsify version in which this bug was not present (if any)

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsrelated to the documentation of docsify itselfpr welcomequestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions