1.0.0 • Published 6 years ago
scrivito-mailchimp-widget v1.0.0
scrivito-mailchimp-lambda-widget
A Scrivito widget including a Mailchimp mailing list signup via lambda function
Screenshot

Installation
Install the package in your scrivito app:
$ npm install scrivito-mailchimp-widgetImport the widget in your javascript (e.g. in src/Widgets/index.js):
import "scrivito-mailchimp-widget";To use this widget
This widget is designed to be used with Netlify Functions. To do so add or update the following to your netlify.toml file:
command = "npm run build && npm run build:lambda"
functions = "lambda"Then add these scripts to your package.json file:
"build:lambda": "netlify-lambda build src/lambda",
"start:lambda": "netlify-lambda serve src/lambda",Then extract the lambda/ folder and contents from
/node_modules/scrivito-mailchimp-widget/src/and set it at the root level of your project in /src/.
ie:
$ cp -r node_modules/scrivito-mailchimp-widget/src/lambda src/Finally, you will need to add your Mailchimp credentials for your list to the the Environment variables in your Netlify dashboard.
MAILCHIMP_API_KEY
MAILCHIMP_LIST_ID
MAILCHIMP_REGIONWidget Configuration
In the widget properties you can set:
- Submit button text
- Success message text
Check code quality
$ npm run eslintand
$ npm run es-check1.0.0
6 years ago