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

Improve documentation: Configure redirects for deployment also (Netlify, etc) #2297

Open
leoloso opened this issue Apr 12, 2020 · 1 comment
Labels
contribution welcome Contributions welcome documentation Any issues related to documentation

Comments

@leoloso
Copy link

leoloso commented Apr 12, 2020

Feature request

What problem does this feature solve?

The documentation is a bit incomplete: in the deployment section, it doesn't mention that the redirects set-up in file enhanceApp.js must be duplicated for the hosting.

In my particular case, I deployed my website to Netlify, and my redirects were not working. Then I learnt that I have to add them in Netlify's own _redirects file.

What does the proposed API look like?

...

How should this be implemented in your opinion?

In the deployment section, add a general warning indicating that redirects may need to be configured for the hosting. In addition, a link to the corresponding documentation, and an example, can be provided for each provider.

For Netlify, the link/example can be:

Create file _redirects under .vuepress/public and recreate your redirects. For instance:

https://mydomain.com/docs/ https://mydomain.com/docs/getting-started/intro.html

Are you willing to work on this yourself?

For Netlify, yes. For the others no, since I don't know how to configure them

@billyyyyy3320 billyyyyy3320 added contribution welcome Contributions welcome documentation Any issues related to documentation labels Apr 12, 2020
@billyyyyy3320
Copy link
Collaborator

Yes, it should be documented because VP is using history mode.

Deploy guide in Vue CLI could be a template.

In order to receive direct hits using history mode on Vue Router, you need to create a file called _redirects under /public with the following content:
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome documentation Any issues related to documentation
Projects
None yet
Development

No branches or pull requests

2 participants