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

[Bug Report] Using relative paths in markdown files will generate 404 links after build #62

Closed
kenberkeley opened this issue Oct 5, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@kenberkeley
Copy link
Contributor

kenberkeley commented Oct 5, 2019

Describe the bug

A bit similar to vuejs/vuepress#1227

As title.

Steps To Reproduce

This blog article page is generated by this markdown file (raw file here).

If you just click all the links on the page directly, everything works fine.
However, if you right click, Copy Link Address and then paste it to a new tab address bar, press the Enter key, finally it will end up with 404 Not Found.

Let's take the first link 前言 as an example.
Copy Link Address, we will have https://kenberkeley.github.io/_posts/my-it-job-hunting-experience-in-australia/0-preface/ , which SPA mode can handle properly whilst direct visits will always fail.

Expected behavior

Should generate https://kenberkeley.github.io/posts/my-it-job-hunting-experience-in-australia/preface/ for the 前言 link, instead of the improper link with /_posts/ and the actual filename 0-preface.
The permalink defined in 前言 page is /posts/my-it-job-hunting-experience-in-australia/preface

Environment (please complete the following information):

  • Theme Version: v1.5.0
  • Vuepress Version: v1.1.0
  • OS: All
  • Browser: All
@kenberkeley
Copy link
Contributor Author

By the way, the meta 上|下一篇 links are correct.

kenberkeley added a commit to kenberkeley/blog that referenced this issue Oct 5, 2019
kenberkeley added a commit to kenberkeley/blog that referenced this issue Oct 9, 2019
@meteorlxy
Copy link
Owner

Seems that it's a common issue of VuePress permalink.

It would be better if you could create issue/PR in vuepress repo 😄

@meteorlxy
Copy link
Owner

This issue can be handled with vuepress-plugin-redirect.

Fixed in v1.5.1

@meteorlxy meteorlxy added the bug Something isn't working label Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants