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

v1.0.0-alpha.41 breaks base config option -- URL always rewrites to root #1857

Closed
3 tasks done
stevebauman opened this issue Jan 28, 2023 · 0 comments · Fixed by #1858
Closed
3 tasks done

v1.0.0-alpha.41 breaks base config option -- URL always rewrites to root #1857

stevebauman opened this issue Jan 28, 2023 · 0 comments · Fixed by #1858
Assignees
Labels
bug Something isn't working build Related to the build system

Comments

@stevebauman
Copy link

stevebauman commented Jan 28, 2023

Describe the bug

Using the newly released v1.0.0-alpha.41 results in my browser URL being re-written to the root when previewing the Vitepress site with a configured base:

export default {
    title: 'API Docs',
    description: 'My API Docs',
    base: '/docs/',
}

Resolution

Downgrading to v1.0.0-alpha.40 resolves this issue. No redirect/URL rewrite occurs.

I suspect it's due to this new feature: #1798

Reproduction

  1. Create a new Vitepress site
  2. Set the base configuration option to /docs/
  3. Run yarn docs:build
  4. Run yarn docs:preview
  5. Navigate to the served site
  6. Notice how the URL is rewritten to the root host, and /docs/ is removed from the URL

Expected behavior

The URL should not be rewritten to the root host. /docs/ should be preserved.

System Info

System:
    OS: macOS 13.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 98.54 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 100.0.2
    Safari: 16.3
  npmPackages:
    vitepress: 1.0.0-alpha.40 => 1.0.0-alpha.40 

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@stevebauman stevebauman added the bug: pending triage Maybe a bug, waiting for confirmation label Jan 28, 2023
@brc-dd brc-dd self-assigned this Jan 29, 2023
@brc-dd brc-dd added bug Something isn't working build Related to the build system and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jan 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Related to the build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants