Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pagination permalink includes pagination link double slash #6917

Closed
7 tasks done
heowc opened this issue Mar 15, 2022 · 2 comments · Fixed by #6918
Closed
7 tasks done

pagination permalink includes pagination link double slash #6917

heowc opened this issue Mar 15, 2022 · 2 comments · Fixed by #6918
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@heowc
Copy link
Contributor

heowc commented Mar 15, 2022

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

I upgraded from beta-15 to beta-17 and found a bug during this. The expected PR is #6221.

If basePageUrl is /, double slash is inserted.

See link: https://github.com/facebook/docusaurus/pull/6221/files#diff-34c6928dee2cfb000cac2409e1279076a6a8b39cc7540cb53ba65bdbb42c6903R75

Reproducible demo

https://heowc.dev/

Steps to reproduce

check next page link

Expected behavior

go to next page

Actual behavior

go to page/2

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • I'd be willing to fix this bug myself.
@heowc heowc added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 15, 2022
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Mar 15, 2022
@Josh-Cena
Copy link
Collaborator

Thanks for reporting! We have a utility method in @docusaurus/utils called normalizeUrl, so if you want to send a PR, just refactor the method to use that instead.

@heowc
Copy link
Contributor Author

heowc commented Mar 15, 2022

Thanks for reporting! We have a utility method in @docusaurus/utils called normalizeUrl, so if you want to send a PR, just refactor the method to use that instead.

Thanks for the quick response. I have already prepared the relevant PR. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants