Skip to content

Hash navigation breaks in 3.4.0 with some plugins #10307

@razzeee

Description

@razzeee

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

We're using https://github.com/gabrielcsapo/docusaurus-plugin-search-local and updating to 3.4.0 changes the links the search produces.

They end up in a duplicated format like https://docs.flathub.org/docs/for-app-authors/linter/docs/for-app-authors/linter#linter-errors instead of https://docs.flathub.org/docs/for-app-authors/linter#linter-errors

See
gabrielcsapo/docusaurus-plugin-search-local#82

I couldn't spot a hint at a behaviour change in the changelog, but I might have overlooked it or this is a regression.

The new hashnav changes are opt in so far it seems?

Reproducible demo

flathub-infra/documentation#339

Steps to reproduce

  1. run yarn
  2. yarn build
  3. yarn serve
  4. Go to the page
  5. Search for linter error
  6. Click the first result

Expected behavior

It should route you to the correct path and scroll down to the hash navigation

Actual behavior

You get a 404

Your environment

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionexternalThis issue is caused by an external dependency and not Docusaurus.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions