question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`serve`: with `base: '/docs/'`, should `/docs` work as `/docs/`?

See original GitHub issue

Describe the bug

When run with vitepress dev docs --base /docs/ and visit /docs route, it will be response with a message:

The server is configured with a public base URL of /docs/ - did you mean to visit [/docs/docs](http://localhost:3000/docs/docs) instead?

I would expect /docs render same as /docs/ or just redirect to /docs/ instead.

Related https://github.com/vuejs/vitepress/issues/852

Reproduction

https://github.com/JounQin/test/tree/vitepress

System Info

System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 20.53 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.1 - ~/Library/Caches/fnm_multishells/50102_1656090482477/bin/node
    Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/50102_1656090482477/bin/yarn
    npm: 8.13.1 - ~/Library/Caches/fnm_multishells/50102_1656090482477/bin/npm
  Browsers:
    Chrome: 103.0.5060.53
    Firefox: 101.0.1
    Safari: 16.0
  npmPackages:
    @vitejs/plugin-react: ^1.3.2 => 1.3.2 
    vite: ^2.9.12 => 2.9.12

Used Package Manager

yarn

Logs

N/A

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
sapphi-redcommented, Jul 3, 2022

It’s still meaningless for an end user to understand the difference between /docs/ and /docs? Why should they care about that?

I think it is not completely meaningless but I agree that a user does not need to care about it usually.

1reaction
sapphi-redcommented, Jul 3, 2022

I understand that but it is confusing if /docs returns the content of /docs/. I think it is ok to change the message.

Maybe it is not confusing if the redirect works after some seconds like <meta http-equiv="refresh" content="3;url=http://localhost:3000/docs/" />.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Share and collaborate on files - Google Support
Share documents, spreadsheets, or presentations with individuals or large groups of people. You can share with people inside or outside your organization.
Read more >
Google Docs: Online Document Editor | Google Workspace
Use Google Docs to create, and collaborate on online documents. Edit together with secure sharing in real-time and from any device.
Read more >
Grackle for Google Docs – How It Works – GrackleDocs
Grackle Docs is an add-on that runs in Google Docs. You can install Grackle Docs here. When opened, it scans the current document...
Read more >
Extending Google Docs | Apps Script
To create a container-bound script from within Google Docs, click Extensions > Apps Script. In either case, it's simple to interact with a ......
Read more >
Learn about Help Scout Docs
Docs allows you to create a public support website, or knowledge base. It integrates directly with Help Scout, so you can write and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found