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

Markdown files with several dots . in name are not routed #3191

Closed
4 tasks done
ianis opened this issue Nov 6, 2023 · 1 comment · Fixed by #3218
Closed
4 tasks done

Markdown files with several dots . in name are not routed #3191

ianis opened this issue Nov 6, 2023 · 1 comment · Fixed by #3218
Labels
bug Something isn't working

Comments

@ianis
Copy link
Contributor

ianis commented Nov 6, 2023

Describe the bug

A markdown file with several dots . such as software-1.2.3.md is not properly routed and leads to a 404 error.
I guess that the router assumes that there is a file named /software-1.2.3 with the .3 extension when using cleanUrls.

Reproduction

  1. Create a new VitePress project
  2. Create a new markdown file named software-1.2.3.md with some content.
  3. Create links the /software-1.2.3 page in the index.md file.
[/software-1.2.3](/software-1.2.3)
[/software-1.2.3.md](/software-1.2.3.md)
  1. Enable cleanUrls.
  2. Click the links on the index page.

Expected behavior

The router should load the page /software-1.2.3 when cleanUrls are active.

System Info

System:
    OS: macOS 11.7.10
    CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
    Memory: 85.34 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.13.0 - /usr/local/bin/node
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.9.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 16.6.1
  npmPackages:
    vitepress: ^1.0.0-rc.25 => 1.0.0-rc.25

Additional context

No response

Validations

@ianis ianis added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 6, 2023
@ianis ianis changed the title Markdown file name with several dots . is not routed Markdown files with several dots . in name are not routed Nov 6, 2023
@brc-dd brc-dd added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Nov 11, 2023
@kaikaibenkai
Copy link

I guess that the router assumes that there is a file named /software-1.2.3 with the .3 extension when using cleanUrls.

it's like a feature (?) try /software-1.2.3.html

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants