Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even after adding a custom 404.md, the standard 404 page is displayed. #3881

Open
4 tasks done
kawamataryo opened this issue May 11, 2024 · 1 comment
Open
4 tasks done
Labels
build Related to the build system enhancement New feature or request

Comments

@kawamataryo
Copy link

kawamataryo commented May 11, 2024

Describe the bug

I am creating documentation using VitePress. To display a custom 404 page, I added a 404.md file. However, after building the project, the standard 404 page is displayed instead.

Here is the reproduction environment: https://stackblitz.com/edit/vite-pukdjm?file=docs%2F404.md

Accessing /404.html displays the custom 404 page. However, when accessing non-existent paths such as /foo.html, the standard 404 page appears instead (the custom 404 page is briefly displayed, but then seems to get replaced).
How can I ensure that the custom 404 page is displayed when accessing non-existent paths?

Reproduction

https://stackblitz.com/edit/vite-pukdjm?file=docs%2F404.md

Expected behavior

custom 404.md page is displayed.

System Info

System:
    OS: macOS 14.4
    CPU: (8) arm64 Apple M2
    Memory: 93.02 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.asdf/installs/nodejs/18.18.2/bin/node
    Yarn: 1.22.19 - ~/.asdf/installs/nodejs/18.18.2/bin/yarn
    npm: 10.2.5 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 8.12.0 - ~/.asdf/installs/nodejs/18.18.2/bin/pnpm
    bun: 1.0.29 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 124.0.6367.201
    Edge: 124.0.2478.97
    Safari: 17.4

Additional context

No response

Validations

@kawamataryo kawamataryo added the bug: pending triage Maybe a bug, waiting for confirmation label May 11, 2024
@kawamataryo kawamataryo changed the title Even after adding a custom 404.md, the standard 404 page is displayed. #3880 Even after adding a custom 404.md, the standard 404 page is displayed. May 11, 2024
@kawamataryo
Copy link
Author

ref #3880

@brc-dd brc-dd added enhancement New feature or request build Related to the build system and removed bug: pending triage Maybe a bug, waiting for confirmation labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to the build system enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants