This package is now deprecated and replaced by @nuxtjs/sanity
- Add the
nuxt-sanitydependency withyarnornpmto your project
yarn add nuxt-sanity // or npm install nuxt-sanity- Add
nuxt-sanityto themodulessection 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 installornpm install - Start development server using
npm run dev