Skip to content

When using a python3 http.server or amazon s3 hosting, doc links can end up as 404 #5570

@cmdcolin

Description

@cmdcolin

🐛 Bug Report

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

If I use python3 http.server (for demo purposes) or amazon s3 (where i'm actually hosting this) then I run into issues with broken links in the documentation if I navigate to a page

Have you read the Contributing Guidelines on issues?

yes

Steps to reproduce

Get latest version
Make a couple doc links
Start up basic http server
Specifically copy and paste into the URL http://localhost:8000/docs/intro#section-heading
URL is rewritten to http://localhost:8000/docs/intro/#section-heading automatically by browser
Then try to nav to ex1
Goes to broken link http://localhost:8000/docs/intro/ex1

Expected behavior

I would expect the links to not be broken, but not sure how that would juggle with the various routing that needs to take place

Actual behavior

Receive a 404

Your environment

Some details here https://github.com/cmdcolin/docusaurus-nav-issue

Ubuntu 20, chrome 93 or firefox 92

I did not try docusaurus.new because I thought it may not support the basic http.server I was testing with here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionclosed: questionThis issue is a user error/misunderstanding.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions