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

Clean urls generate files without extension and crashes #2420

Closed
1 task done
davidgiga1993 opened this issue Jun 2, 2020 · 1 comment
Closed
1 task done

Clean urls generate files without extension and crashes #2420

davidgiga1993 opened this issue Jun 2, 2020 · 1 comment
Labels
type: feature request Request to add a new feature

Comments

@davidgiga1993
Copy link

davidgiga1993 commented Jun 2, 2020

  • I confirm that this is an issue rather than a question.

Bug report

When using the clean-url plugin and setting both suffixes to '' the vuepress build docs command will fail under certain conditions and provide files with no extension

Steps to reproduce

  1. Use the vuepress-plugin-clean-urls plugin, set both suffixes to ''.
  2. Create a page called test.md and a file test/sub.md
  3. Run build

What is expected?

The output files should always have a .html extension as any further URL rewrites must be handled by the webserver anyways. If this change would break any other things I'm not aware of it should be possible to configure a forceExtension option.
This change would also resolve the crash.

This change must be made in the core thus I created the issue here

What is actually happening?

Vue tries to render test.md as test and test/sub.md as test/sub which causes a crash since test is a file and not a directly

Other relevant information

  • Output of npx vuepress info in my VuePress project:

  System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz
  Binaries:
    Node: 10.16.0 - D:\Development\nodejs\node-v8.11.2-win-x64\node.EXE
    Yarn: Not Found
    npm: 6.9.0 - D:\Development\nodejs\node-v8.11.2-win-x64\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vuepress/core:  1.5.0
    @vuepress/theme-default:  1.5.0
    vuepress: ^1.5.0 => 1.5.0
  npmGlobalPackages:
    vuepress: Not Found

@billyyyyy3320
Copy link
Collaborator

Thanks for the report. Going to trace the issue in #2452.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature
Projects
None yet
Development

No branches or pull requests

3 participants