Setup
Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js.
Installation
Add @voorhoede/nuxt-datocms-module
dependency to your project:
yarn add @voorhoede/nuxt-datocms-module
npm install @voorhoede/nuxt-datocms-module
Then, add @voorhoede/nuxt-datocms-module
to the modules
section of nuxt.config.js
:
nuxt.config.js
{
modules: [
'@voorhoede/nuxt-datocms-module'
],
datocms: {
datocmsReadOnlyToken: process.env.MY_SECRET
}
}
That's it! You can now use
$datocms
in your Nuxt app ✨