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

Unclear how to add _redirect file for Netlify #912

Closed
tyrw opened this issue Oct 7, 2018 · 2 comments
Closed

Unclear how to add _redirect file for Netlify #912

tyrw opened this issue Oct 7, 2018 · 2 comments

Comments

@tyrw
Copy link

tyrw commented Oct 7, 2018

Evan suggested using Netlify to do CDN-level redirects.

Originally posted by @yyx990803 in #239 (comment)

Their docs (https://www.netlify.com/docs/redirects) suggest a _redirects file placed in the root of the project.

The only way I can find to get a custom file into the root of the deploy folder (docs/.vuepress/dist) is to run the build steps locally, then manually add the file, then commit dist and push it to Netlify.

Can we get this file into the dist folder during the build automatically?

@tyrw
Copy link
Author

tyrw commented Oct 7, 2018

I found the answer in a more general form here: https://vuepress.vuejs.org/2018/08/15/assets/#public-files

Sometimes you may need to provide static assets that are not directly referenced in any of your markdown or theme components - for example, favicons and PWA icons. In such cases you can put them inside .vuepress/public and they will be copied to the root of the generated directory.

@tyrw tyrw closed this as completed Oct 7, 2018
@jamesrhea
Copy link

Ironically, that's now a broken link with no redirect. Here's the latest correct URL: https://vuepress.vuejs.org/guide/assets.html#public-files

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

No branches or pull requests

2 participants