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

When I customize permalink, the refresh page displays 404. #1783

Open
1 task done
AmazingMoon opened this issue Aug 16, 2019 · 2 comments
Open
1 task done

When I customize permalink, the refresh page displays 404. #1783

AmazingMoon opened this issue Aug 16, 2019 · 2 comments
Labels
has PR Has a related PR

Comments

@AmazingMoon
Copy link

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

Bug report

Version: 1.0.3

Steps to reproduce

like this

module.exports = {
  permalink: "/:year-:month-:day/:regular"
};

What is expected?

There is no problem switching the Sidebar normally, and it should be fine when I refresh the page.

What is actually happening?

404 is displayed when the page is refreshed.

@billyyyyy3320
Copy link
Collaborator

:regular is generated by VuePress by default:

    // foo.md -> /foo.html
    // foo.vue -> /foo.html
    // foo/bar.md -> /foo/bar.html
    // foo/bar.vue -> /foo/bar.html

Since :regular starts with a slash, It'll work fine if you remove the slash before :regular.

module.exports = {
  permalink: "/:year-:month-:day:regular"
};

@billyyyyy3320
Copy link
Collaborator

We'll consider to remove the leading slash of :regular because it's different with all the other template variables(only :regular can't go before a slash).

Or we may update documentation to warn that :regular is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Has a related PR
Projects
None yet
Development

No branches or pull requests

3 participants