Built content when served manually (not vitepress dev <src>
) adds a 404 page at end of page, and later navigation loads the page there at bottom replacing 404 at the bottom.
#1345
Labels
need more info
Further information is requested
Describe the bug
Mainly described in the title, further description is at 4th point of reproducing the error. This is reproduced in normal python http server, and seems to happen in github pages as well.
Might be related to #412, but I don't think its exactly the same behavior & cause.
Reproduction
. ├── content │ ├── first │ │ ├── index.md │ │ └── second.md │ └── index.md ├── package.json └── yarn.lock
vitepress-repro.zip
yarn && yarn run content:build
a
site
folder at project root should be created.python3 -m http.server -d . 4000
, and lookuplocalhost:4000/site
.Everything looks fine, you can navigate to First using navbar, and second.md file in first by left panel.
localhost:4000/site/first/second
.You should see the page is loaded but a 404 page is added at the bottom too, now if you try to navigate, the top of page remains as is, the bottom of page is instead replaced by the new content.
Expected behavior
Page should not append a 404 page, nor it should load navigated pages in bottom of page instead of replacing current page.
System Info
Additional context
Full page screenshot
Two errors, in order appears in the browser's console:
Point to be noted is that
first_second_index.md.undefined.lean.js
is trying to get fetched, i.e. the "undefined" hash.Validations
The text was updated successfully, but these errors were encountered: