@nuxtjs/sanity
@nuxtjs/sanity
Access text, images, and other media with Nuxt and the Sanity headless CMS.
Nuxt Sanity
Features
- Just bring your
sanity.config.ts
- no additional configuration required - Ultra-lightweight Sanity client
- Zero-config image/file components + portable text renderer
- Supports GROQ syntax highlighting
- Nuxt 3 and Nuxt Bridge support
Quick setup
- Add
@nuxtjs/sanity
dependency to your project
npx nuxi@latest module add sanity
- Add
@nuxtjs/sanity
to themodules
section ofnuxt.config.ts
{
modules: [
'@nuxtjs/sanity',
],
sanity: {
// module options
}
}
Note: For Nuxt 2 support without Bridge, install @nuxtjs/sanity@0.10.0
and follow the instructions at https://v0.sanity.nuxtjs.org.
Development
- Clone this repository
- Install dependencies using
pnpm install
- Stub module with
pnpm dev:prepare
- Start development server using
pnpm dev