[v2] 404.html routePath does not include siteConfig.baseUrl #2229
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
🐛 Bug Report
The
routesPaths
parameter passed to thepostBuild
lifecycle event contains the wrong path to the404.html
file if you have abaseUrl
configured indocusaurus.config.js
.This results in wrong data generated by plugins that access the
routesPaths
parameter. An example is the sitemap plugin, which generates an invalid sitemap entry.Have you read the Contributing Guidelines on issues?
Yes :)
To Reproduce
baseUrl
to something different than just/
indocusuaurus.config.json
.routesPaths
parameter in a plugin'spostBuild
lifecycle callback. You'll see the wrong path to the 404 file.Expected behavior
I would expect the
routesPaths
to look like this:and the sitemap to contain:
Actual Behavior
Currently,
routesPaths
look like this:The
sitemap.xml
file looks like this:Reproducible Demo
To reproduce, build the documentation inside the
docs
folder of https://github.com/cmfcmf/OpenWeatherMap-PHP-API.The text was updated successfully, but these errors were encountered: