Skip to content

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

Open
@Lea-Reift

Description

@Lea-Reift
  • I confirm that this is an issue rather than a question.

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

  • Output of npx vuepress info in my VuePress project:
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions