Setup

Learn how to setup newsletter module in your Nuxt 3 application.


Check out the Nuxt 3 documentation for more information about installing and using modules.

Installation

Add nuxt-newsletter dependency to your project:

yarn
yarn add nuxt-newsletter
NPM
npm install nuxt-newsletter --save

Then, add nuxt-newsletter to the modules section of your Nuxt configuration:

nuxt.config.js|ts
export default defineNuxtConfig({  modules: [    [      "nuxt-newsletter",      {        // Options      },    ],  ],  // Or  newsletter: {    // Options  },});

Options

Defaults:

{  <NEWSLETTER_PROVIDER>: {    apiKey: process.env.BUTTONDOWN_API_KEY,    component: true  },}

apiKey

API Key that will allow the module to communicate with the newsletter API

component

If set to true, it will automatically import the NewsletterForm.vue component.