This package is now deprecated and replaced by @nuxtjs/sanity
- Add the
nuxt-sanity
dependency withyarn
ornpm
to your project
yarn add nuxt-sanity // or npm install nuxt-sanity
- Add
nuxt-sanity
to themodules
section ofnuxt.config.js
{
modules: [
'nuxt-sanity'
]
}
- Configure the module:
{
modules: [
// Simple usage
'nuxt-sanity',
// With inline options
['nuxt-sanity', { /* module options */ }]
],
// Or a Sanity object
sanity: {
projectId: '', // string, required
dataset: '', // string, required
token: '', // string, optional
useCdn: false // boolean, optional, default is false
}
}
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev