1 | # vuepress-plugin-mailchimp
|
2 |
|
3 | [![NPM version](https://img.shields.io/npm/v/vuepress-plugin-mailchimp)](https://www.npmjs.com/package/vuepress-plugin-mailchimp)
|
4 | [![NPM LICENSE](https://badgen.net/npm/license/vuepress-plugin-mailchimp)](https://github.com/newsbielt703/vuepress-plugin-mailchimp/blob/master/LICENSE)
|
5 | [![Circle ci](https://badgen.net/circleci/github/newsbielt703/vuepress-plugin-mailchimp)](https://circleci.com/gh/newsbielt703/workflows/vuepress-plugin-mailchimp)
|
6 | [![LGTM](https://badgen.net/lgtm/grade/g/newsbielt703/vuepress-plugin-mailchimp)](https://lgtm.com/projects/g/newsbielt703/vuepress-plugin-mailchimp)
|
7 |
|
8 | Simplifies subscribing new email addresses to a Mailchimp email list.
|
9 |
|
10 | ## Install
|
11 |
|
12 | First of all, you have to sign up for [Mailchimp](https://mailchimp.com/).
|
13 |
|
14 | ```bash
|
15 | yarn add vuepress-plugin-mailchimp -D
|
16 | # OR npm install vuepress-plugin-mailchimp -D
|
17 | ```
|
18 |
|
19 | ## Usage
|
20 |
|
21 | Take a look at [Using a Plugin](https://vuepress.vuejs.org/plugin/using-a-plugin.html).
|
22 |
|
23 | ```javascript
|
24 | // .vuepress/config.js
|
25 | module.exports = {
|
26 | plugins: [
|
27 | "vuepress-plugin-mailchimp",
|
28 | {
|
29 | // You need to provide this plugin with your Mailchimp endpoint in order for it
|
30 | // to know where to save the email address. See more detail in Config section.
|
31 | endpoint: ""
|
32 | }
|
33 | ]
|
34 | };
|
35 | ```
|
36 |
|
37 | ### `<SimpleNewsletter/>`
|
38 |
|
39 | This plugin provides a out-of-box component. Since it has been registered automatically, you can simply use it in your `.md` file.
|
40 |
|
41 | - Source code:[SimpleNewsletter.vue](https://github.com/newsbielt703/vuepress-plugin-mailchimp/blob/master/src/SimpleNewsletter.vue)
|
42 | - Usage:
|
43 |
|
44 | ```md
|
45 | // .md file
|
46 |
|
47 | ...
|
48 | your content
|
49 | ...
|
50 |
|
51 | <SimpleNewsletter/>
|
52 | ```
|
53 |
|
54 | or
|
55 |
|
56 | ```vue
|
57 | // .vue file
|
58 |
|
59 | <template>
|
60 | <SimplePagination />
|
61 | </template>
|
62 |
|
63 | <script>
|
64 | import { SimpleNewsletter } from "vuepress-plugin-mailchimp/src/SimpleNewsletter";
|
65 | export default {
|
66 | components: {
|
67 | SimpleNewsletter
|
68 | }
|
69 | };
|
70 | </script>
|
71 | ```
|
72 |
|
73 | Check out the full [documentation](https://vuepress-plugin-mailchimp.billyyyyy3320.com/).
|
74 |
|
75 | ## License
|
76 |
|
77 | MIT © [Billyyyyy3320](https://github.com/newsbielt703)
|