This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree 1 file changed +17
-16
lines changed
1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -436,29 +436,30 @@ module.exports = {
436
436
}
437
437
```
438
438
439
- Again, a out-of-box component ` <Newsletter> ` . you can import it from ` '@vuepress/plugin-blog/lib/client/components' ` .
439
+ ` vuepress-plugin-mailchimp ` has already registered a global component ` SimpleNewsletter ` . Here's a simple usage:
440
+ ``` vue
441
+ // layouts/Post.vue
442
+ <template>
443
+ <div>
444
+ <Content />
445
+ <SimpleNewsletter />
446
+ </div>
447
+ </template>
448
+ ```
440
449
450
+ In your theme, You'll probably offer users options whether to enable or not. You can use ` this.$service.email.enabled ` to access it:
441
451
``` vue
442
452
// layouts/Post.vue
443
453
<template>
444
- <div>
445
- <Content />
446
- <Newsletter />
447
- <Comment />
448
- </div>
454
+ <div>
455
+ <Content />
456
+ <SimpleNewsletter v-if="$service.email.enabled"/>
457
+ </div>
449
458
</template>
459
+ ```
450
460
451
- <script>
452
- import { Comment, Newsletter } from '@vuepress/plugin-blog/lib/client/components'
461
+ Please head [ UI-customization] ( https://vuepress-plugin-mailchimp.billyyyyy3320.com/#ui-customization ) if you don't like the default UI.
453
462
454
- export default {
455
- components: {
456
- Comment,
457
- Newsletter
458
- },
459
- }
460
- </script>
461
- ```
462
463
## Writing a blog theme
463
464
464
465
If everything is ok, you can start to write a blog theme. Actually, there are only 2 necessary layout components to
You can’t perform that action at this time.
0 commit comments