vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.43k stars 4.79k forks source link

Base url does not work for anchor tags on build #3194

Open Lea-Reif opened 5 months ago

Lea-Reif commented 5 months ago

Bug report

Steps to reproduce

  1. Add the base property in config.js
  2. Build the docs

What is expected?

The links should use the base config as base url

What is actually happening?

The anchor tags are prepended by a / in all href's and protocol slashes https:// are compiled as http:/ (just one slash)

Other relevant information

Link (Style) and script tags have the correct base_url

Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
  Binaries:
    Node: 18.8.0 - C:\laragon\bin\nodejs\node-v18\node.EXE
    Yarn: Not Found
    npm: 9.4.2 - C:\laragon\bin\nodejs\node-v18\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (120.0.2210.91)
  npmPackages:
    @vuepress/core:  1.9.10
    @vuepress/theme-default:  1.9.10
    vuepress: ^1.5.3 => 1.9.10
  npmGlobalPackages:
    vuepress: Not Found