saber-plugin-netlify-redirect
v0.1.2
Published
Automatically generate or update `_redirects` file in your public folder for Netlify.
Downloads
6
Readme
saber-plugin-netlify-redirect
Automatically generate or update _redirects
file in your public folder for Netlify.
Install
yarn add saber-plugin-netlify-redirect
Usage
In your saber-config.yml
:
plugins:
- resolve: saber-plugin-netlify-redirect
Then you can create redirects using the pages.createRedirect
API.
Since Netlify automatically rewrites routes like /about
to /about.html
, this plugin will also create redirects for all .html
routes so that /about
will be redirected to /about.html
when it does not exist.
License
MIT.