Setup

Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js.

Add @ajshortt/nuxt-datocms dependency to your project:

yarn add @ajshortt/nuxt-datocms
npm install @ajshortt/nuxt-datocms

Then, add @ajshortt/nuxt-datocms to the modules section in your nuxt.config.js. You can use either of the following ways to specify the module options:

nuxt.config.js
{
  modules: [
    '@ajshortt/nuxt-datocms',
  ],
  nuxtDatoCms: {
    /* module options */
  },
}

or

nuxt.config.js
{
  modules: [
    [
      '@ajshortt/nuxt-datocms',
      { /* module options */ }
    ]
  ],
}
Edit this page on GitHub Updated at Thu, Jan 20, 2022