@helloample/netlify-plugin-redirects
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "@helloample/netlify-plugin-redirects", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Read a CSV file, parse the rows and write them to `_redirects` _before_ Netlify processes your build.", | ||
@@ -28,4 +28,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"mocha": "^8.0.1" | ||
"mocha": "^7.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=8.3.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # netlify-plugin-redirects | ||
Read a CSV file, parse the rows and write them to `_redirects` _before_ Netlify processes your build. | ||
Read a CSV file, parse the rows and write them to `_redirects` _before_ Netlify processes your build. Check out an example implementation [here](https://github.com/ample/netlify-plugin-redirects-demo). | ||
@@ -28,2 +28,25 @@ ## Why? | ||
## Install | ||
Add the plugin to your `package.json` file... | ||
``` | ||
$ npm i @helloample/netlify-plugin-redirects -D | ||
``` | ||
Create a new file at the root of your project called `redirects.csv` with your redirect rules (see [setup](https://github.com/ample/netlify-plugin-redirects/blob/main/README.md#setup) for more information on formatting your rules)... | ||
``` | ||
$ echo "/redirect-me,https://ample.co,301!" > ./redirects.csv | ||
``` | ||
And add the plugin to your `netlify.toml` file (see [configuration](https://github.com/ample/netlify-plugin-redirects/blob/main/README.md#configuration) for available options)... | ||
``` | ||
[[plugins]] | ||
package = "@helloample/netlify-plugin-redirects" | ||
``` | ||
Commit & push changes back to your repository. Now go watch the next build on Netlify. | ||
## Configuration | ||
@@ -41,3 +64,3 @@ | ||
[[plugins]] | ||
package = "./_plugins/netlify-plugin-redirects" | ||
package = "@helloample/netlify-plugin-redirects" | ||
[plugins.inputs] | ||
@@ -44,0 +67,0 @@ source = "./redirects.csv" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19472
72