-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
bug: pending triageMaybe a bug, waiting for confirmationMaybe a bug, waiting for confirmation
Description
Describe the bug
Configuring the base as a CDN address will cause a hyperlink href exception
<a class="title"
href="http:/abc.cdn.cn/hello/"
data-v-b817187b>
<!--[--><!--]--><!----><!--[-->VitePress<!--]--><!--[--><!--]-->
</a>
Reproduction
// config.js
export default ({
base: 'http://abc.cdn.cn/hello/',
});
// index.md
# hello

// dist/index.html
...
<header class="VPNav" data-v-30b21250 data-v-04c31db4>
<div class="VPNavBar" data-v-04c31db4 data-v-d8c1e712>
<div class="container" data-v-d8c1e712>
<div class="title" data-v-d8c1e712>
<div class="VPNavBarTitle" data-v-d8c1e712 data-v-b817187b>
<a
class="title"
href="http:/abc.cdn.cn/hello/"
data-v-b817187b
><!--[--><!--]--><!----><!--[-->VitePress<!--]--><!--[--><!--]--></a
>
</div>
</div>
...
Expected behavior
href="/"
or
href="http://abc.cdn.cn/hello/"
System Info
win11
chrome118
"vitepress": "1.0.0-rc.23"
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- 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.
Please review the following demo:
https://stackblitz.com/edit/github-tyb3oh-fjwkma?file=docs%2F.vitepress%2Fdist%2Findex.html
or
https://github.com/yangdan8/vitepress-bug.git
Metadata
Metadata
Assignees
Labels
bug: pending triageMaybe a bug, waiting for confirmationMaybe a bug, waiting for confirmation